platforminternal

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Store               PlatformStore
	Token               string
	AuthenticateRequest func(*http.Request) (platformauth.Principal, bool, error)
}

func (Handler) Register

func (h Handler) Register(mux *http.ServeMux)

type PlatformStore

type PlatformStore interface {
	PrincipalForUserID(ctx context.Context, userID string) (platformauth.Principal, error)
	AuthenticateUserAPIKey(ctx context.Context, rawKey string) (platformauth.Principal, bool, error)
	ResolveUserIDs(ctx context.Context, ids []string) (map[string]string, error)
	ResolveTeamIDs(ctx context.Context, ids []string) (map[string]string, error)
	WriteAudit(ctx context.Context, event platformstore.AuditEvent)
	CreateTeam(ctx context.Context, slug, name, createdByUserID string) (platformstore.Team, error)
	ListTeams(ctx context.Context) ([]platformstore.Team, error)
	GetTeamBySlug(ctx context.Context, slug string) (platformstore.Team, bool, error)
	CreateAgent(ctx context.Context, teamSlug, name, createdBy string) (platformstore.Agent, error)
	ListAgents(ctx context.Context, filter platformstore.AgentListFilter) (platformstore.AgentPage, error)
	GetAgent(ctx context.Context, id string) (platformstore.Agent, bool, error)
	RenameAgent(ctx context.Context, id, name string) (platformstore.Agent, error)
	SetAgentStatus(ctx context.Context, id, status, actorID string) (platformstore.Agent, error)
	DeleteTeamBySlug(ctx context.Context, slug string) error
	ListNamespaces(ctx context.Context) ([]map[string]any, error)
	GetNamespace(ctx context.Context, namespace string) (map[string]any, bool, error)
	ListTeamMemberships(ctx context.Context, teamSlug string) ([]platformstore.TeamMembership, error)
	UpsertTeamMembership(ctx context.Context, teamSlug, userID, role string) (platformstore.TeamMembership, error)
	DeleteTeamMembership(ctx context.Context, teamSlug, userID string) error
	CreatePasswordUser(ctx context.Context, email, password, role string) (platformstore.User, error)
	OperationsSnapshot(ctx context.Context, filter platformstore.OperationsFilter) (platformstore.OperationsSnapshot, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL