Documentation
¶
Overview ¶
Package platformapi is runtime-api's network client for platform-api. The two services share a network contract, platform-api's openapi.yaml, and not code: contract_test.go fails when this client calls an operation the spec omits.
Index ¶
- Variables
- func IsSessionNotFound(err error) bool
- type APIKeySummary
- type Agent
- type AgentPage
- type AuditEvent
- type AuditLog
- type Client
- func (c *Client) AbortImagePublication(ctx context.Context, publicationID string, ...) (apikit.ImagePublicationIntent, error)
- func (c *Client) ActivateEnrollmentIntent(ctx context.Context, opID string, req apikit.EnrollmentIntentActivateRequest) (apikit.EnrollmentIntent, error)
- func (c *Client) AgentCertificates(ctx context.Context, id, humanID string) (apikit.CertificateActivity, error)
- func (c *Client) BeginImagePublication(ctx context.Context, req apikit.ImagePublicationBeginRequest) (apikit.ImagePublicationIntent, error)
- func (c *Client) ClaimAccessIntentObserverLease(ctx context.Context, clusterKey, observerID string) (apikit.AccessIntentObserverLeaseResponse, error)
- func (c *Client) ClaimAgentCleanupIntentFence(ctx context.Context, agentID, workerID string) (apikit.AgentCleanupFenceResponse, error)
- func (c *Client) ClaimDeploymentIntentFence(ctx context.Context, deploymentID, workerID string) (apikit.DeploymentIntentFenceResponse, error)
- func (c *Client) ClaimEnrollmentIntentFence(ctx context.Context, opID, workerID string) (apikit.EnrollmentIntentFenceResponse, error)
- func (c *Client) ClaimGrantIntentFence(ctx context.Context, grantID, workerID string) (apikit.GrantIntentFenceResponse, error)
- func (c *Client) ClaimImagePublicationFence(ctx context.Context, publicationID, workerID string) (apikit.ImagePublicationFenceResponse, error)
- func (c *Client) ClaimRestartOperationFence(ctx context.Context, operationID, workerID string) (apikit.RestartOperationFenceResponse, error)
- func (c *Client) ClaimServerIntentFence(ctx context.Context, serverID, workerID string) (apikit.ServerIntentFenceResponse, error)
- func (c *Client) ClaimTeamIntentFence(ctx context.Context, teamID, workerID string) (apikit.TeamIntentFenceResponse, error)
- func (c *Client) ClaimTeamIntentObserverLease(ctx context.Context, clusterKey, observerID string) (apikit.TeamIntentObserverLeaseResponse, error)
- func (c *Client) ClaimWorkloadObserverLease(ctx context.Context, clusterKey, observerID string) (apikit.WorkloadObserverLeaseResponse, error)
- func (c *Client) CompleteSessionEnrollment(ctx context.Context, namespace, name, uid string) error
- func (c *Client) Configured() bool
- func (c *Client) CreateAgent(ctx context.Context, teamSlug, name, createdBy string) (Agent, error)
- func (c *Client) CreateEnrollmentIntent(ctx context.Context, req apikit.EnrollmentIntentCreateRequest) (apikit.EnrollmentIntent, error)
- func (c *Client) CreatePasswordUser(ctx context.Context, email, password, role string) (User, error)
- func (c *Client) CreateRestartOperation(ctx context.Context, req apikit.RestartOperationCreateRequest) (apikit.RestartOperationIntent, error)
- func (c *Client) CreateTeam(ctx context.Context, slug, name, createdByUserID string) (Team, error)
- func (c *Client) CreateTeamUser(ctx context.Context, teamSlug, email, password, role string) (User, TeamMembership, error)
- func (c *Client) DeleteDeploymentIntent(ctx context.Context, deploymentID string, ...) (apikit.DeploymentIntent, error)
- func (c *Client) DeletePendingSession(ctx context.Context, namespace, name, uid, humanID string) error
- func (c *Client) DeleteSession(ctx context.Context, namespace, name string) error
- func (c *Client) DeleteSessionIfUID(ctx context.Context, namespace, name, uid string) error
- func (c *Client) DeleteTeamBySlug(ctx context.Context, slug string) error
- func (c *Client) DeleteTeamMembership(ctx context.Context, teamSlug, userID string) error
- func (c *Client) FinalizeImagePublication(ctx context.Context, publicationID string, ...) (apikit.ImagePublicationIntent, error)
- func (c *Client) GetAgent(ctx context.Context, id string) (Agent, bool, error)
- func (c *Client) GetAgentCleanupIntent(ctx context.Context, agentID string) (apikit.AgentCleanupIntent, bool, error)
- func (c *Client) GetDeploymentIntent(ctx context.Context, deploymentID string) (apikit.DeploymentIntent, bool, error)
- func (c *Client) GetEnrollmentIntent(ctx context.Context, opID string) (apikit.EnrollmentIntent, bool, error)
- func (c *Client) GetGrantIntent(ctx context.Context, grantID string) (apikit.GrantIntent, bool, error)
- func (c *Client) GetImagePublicationIntent(ctx context.Context, publicationID string) (apikit.ImagePublicationIntent, bool, error)
- func (c *Client) GetNamespace(ctx context.Context, namespace string) (map[string]any, bool, error)
- func (c *Client) GetRestartOperationIntent(ctx context.Context, operationID string) (apikit.RestartOperationIntent, bool, error)
- func (c *Client) GetServerIntent(ctx context.Context, serverID string) (apikit.ServerIntent, bool, error)
- func (c *Client) GetSession(ctx context.Context, namespace, name string) (sessionstate.Session, bool, error)
- func (c *Client) GetTeamBySlug(ctx context.Context, slug string) (Team, bool, error)
- func (c *Client) GetTeamIntent(ctx context.Context, teamID string) (apikit.TeamNamespaceIntent, bool, error)
- func (c *Client) ListAgents(ctx context.Context, teamSlug, statusFilter, q, cursor string, limit int) (AgentPage, error)
- func (c *Client) ListDeploymentIntents(ctx context.Context) ([]apikit.DeploymentIntent, error)
- func (c *Client) ListEnrollmentIntents(ctx context.Context) ([]apikit.EnrollmentIntent, error)
- func (c *Client) ListGrantIntents(ctx context.Context) ([]apikit.GrantIntent, error)
- func (c *Client) ListImagePublicationIntents(ctx context.Context) ([]apikit.ImagePublicationIntent, error)
- func (c *Client) ListNamespaces(ctx context.Context) ([]map[string]any, error)
- func (c *Client) ListRestartOperationIntents(ctx context.Context) ([]apikit.RestartOperationIntent, error)
- func (c *Client) ListServerIntents(ctx context.Context) ([]apikit.ServerIntent, error)
- func (c *Client) ListSessions(ctx context.Context, namespace string) ([]sessionstate.Session, error)
- func (c *Client) ListSessionsFiltered(ctx context.Context, filter sessionstate.Filter) ([]sessionstate.Session, error)
- func (c *Client) ListTeamIntents(ctx context.Context) ([]apikit.TeamNamespaceIntent, error)
- func (c *Client) ListTeamMemberships(ctx context.Context, teamSlug string) ([]TeamMembership, error)
- func (c *Client) ListTeams(ctx context.Context) ([]Team, error)
- func (c *Client) OperationsSnapshot(ctx context.Context, filter OperationsFilter) (OperationsSnapshot, error)
- func (c *Client) OverviewCounts(ctx context.Context) (apikit.OverviewCounts, error)
- func (c *Client) PrincipalForUserID(ctx context.Context, userID string) (passport.Principal, error)
- func (c *Client) PutSession(ctx context.Context, item sessionstate.Session) (sessionstate.Session, error)
- func (c *Client) RecordAgentCleanupIntentReceipt(ctx context.Context, agentID string, req apikit.AgentCleanupReceiptRequest) (apikit.AgentCleanupReceipt, error)
- func (c *Client) RecordDeploymentIntentObservation(ctx context.Context, deploymentID string, ...) (apikit.WorkloadStatusObservation, error)
- func (c *Client) RecordDeploymentIntentReceipt(ctx context.Context, deploymentID string, ...) (apikit.WorkloadExecutionReceipt, error)
- func (c *Client) RecordEnrollmentIntentReceipt(ctx context.Context, opID string, req apikit.EnrollmentIntentReceiptRequest) (apikit.EnrollmentReceipt, error)
- func (c *Client) RecordGrantIntentObservation(ctx context.Context, grantID string, req apikit.GrantIntentObservationRequest) (apikit.GrantObservation, error)
- func (c *Client) RecordGrantIntentReceipt(ctx context.Context, grantID string, req apikit.GrantIntentReceiptRequest) (apikit.GrantReceipt, error)
- func (c *Client) RecordImagePublicationReceipt(ctx context.Context, publicationID string, ...) (apikit.WorkloadExecutionReceipt, error)
- func (c *Client) RecordRestartComponentCheckpoint(ctx context.Context, operationID string, ...) (apikit.RestartOperationIntent, error)
- func (c *Client) RecordRestartOperationReceipt(ctx context.Context, operationID string, ...) (apikit.WorkloadExecutionReceipt, error)
- func (c *Client) RecordServerIntentObservation(ctx context.Context, serverID string, ...) (apikit.WorkloadStatusObservation, error)
- func (c *Client) RecordServerIntentReceipt(ctx context.Context, serverID string, req apikit.ServerIntentReceiptRequest) (apikit.WorkloadExecutionReceipt, error)
- func (c *Client) RecordServerRetirementCheckpoint(ctx context.Context, serverID string, ...) (apikit.ServerIntent, error)
- func (c *Client) RecordTeamIntentObservation(ctx context.Context, teamID string, req apikit.TeamIntentObservationRequest) (apikit.TeamNamespaceObservation, error)
- func (c *Client) RecordTeamIntentReceipt(ctx context.Context, teamID string, req apikit.TeamIntentReceiptRequest) (apikit.TeamNamespaceReceipt, error)
- func (c *Client) RenameAgent(ctx context.Context, id, name string) (Agent, error)
- func (c *Client) RetireServerIntent(ctx context.Context, serverID string, req apikit.ServerIntentRetireRequest) (apikit.ServerIntent, error)
- func (c *Client) RevokeGrantIntent(ctx context.Context, grantID string, deleteGrant bool) (apikit.GrantIntent, error)
- func (c *Client) RevokeSession(ctx context.Context, namespace, name, cause string) error
- func (c *Client) RevokeSessions(ctx context.Context, filter sessionstate.Filter, cause string) (int64, error)
- func (c *Client) SetAgentStatus(ctx context.Context, id, statusName, actorID string) (Agent, error)
- func (c *Client) SetSessionRevoked(ctx context.Context, namespace, name string, revoked bool, cause string) error
- func (c *Client) UpsertDeploymentIntent(ctx context.Context, req apikit.DeploymentIntentUpsertRequest) (apikit.DeploymentIntent, error)
- func (c *Client) UpsertGrantIntent(ctx context.Context, req apikit.GrantIntentUpsertRequest) (apikit.GrantIntent, error)
- func (c *Client) UpsertServerIntent(ctx context.Context, req apikit.ServerIntentUpsertRequest) (apikit.ServerIntent, error)
- func (c *Client) UpsertTeamMembership(ctx context.Context, teamSlug, userID, role string) (TeamMembership, error)
- func (c *Client) WriteAudit(ctx context.Context, event AuditEvent)
- type ImageActivity
- type OperationsFilter
- type OperationsFilterResponse
- type OperationsSnapshot
- type Team
- type TeamMembership
- type User
- type UserActivity
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAccessIntentDisabled is returned when platform-api's access intent journal is disabled (503). ErrAccessIntentDisabled = errors.New("access intent journal disabled") // ErrAccessIntentNotFound is returned when an access intent resource does not exist (404). ErrAccessIntentNotFound = errors.New("access intent not found") // ErrAccessIntentConflict is returned on stale fence/revision/observer epoch or revoked authority (409). ErrAccessIntentConflict = errors.New("access intent conflict") // ErrAccessIntentInvalid is returned on malformed requests (400). ErrAccessIntentInvalid = errors.New("invalid access intent request") )
var ( ErrAgentNotFound = errors.New("agent not found") ErrTeamNotFound = errors.New("team not found") ErrAgentNameTaken = errors.New("agent name already exists in team") ErrInvalidAgentName = errors.New("invalid agent name") )
var ( // ErrTeamIntentDisabled is returned when PLATFORM_TEAM_INTENT_JOURNAL is off. ErrTeamIntentDisabled = errors.New("team intent journal disabled") // ErrTeamIntentConflict is returned when a receipt or observation is // rejected due to a stale fence, revision, observer epoch, or ownership mismatch. ErrTeamIntentConflict = errors.New("team intent conflict") )
var ( // ErrWorkloadIntentDisabled indicates PLATFORM_WORKLOAD_INTENT_JOURNAL is disabled. ErrWorkloadIntentDisabled = errors.New("workload intent journal disabled") // ErrWorkloadIntentNotFound indicates the requested workload intent does not exist. ErrWorkloadIntentNotFound = errors.New("workload intent not found") // ErrWorkloadIntentConflict indicates a stale fence, revision, observer epoch, // state transition, or mutable-tag overlap conflict (HTTP 409). ErrWorkloadIntentConflict = errors.New("workload intent conflict") )
var ErrNotConfigured = errors.New("platform identity client not configured")
ErrNotConfigured is returned when platform identity is unavailable.
Functions ¶
func IsSessionNotFound ¶
IsSessionNotFound accepts the shared sentinel and typed HTTP errors.
Types ¶
type APIKeySummary ¶
type APIKeySummary struct {
ID string `json:"id"`
Name string `json:"name"`
Prefix string `json:"prefix"`
CreatedAt time.Time `json:"created_at"`
Revoked bool `json:"revoked"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
}
APIKeySummary is the non-secret metadata for a user API key.
type AuditEvent ¶
type AuditEvent = apikit.AuditEvent
AuditEvent is the write-side platform audit envelope.
type AuditLog ¶
type AuditLog struct {
ID int64 `json:"id"`
UserID string `json:"user_id,omitempty"`
Email string `json:"email,omitempty"`
Action string `json:"action"`
Resource string `json:"resource"`
Namespace string `json:"namespace,omitempty"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
ActorIP string `json:"actor_ip,omitempty"`
RequestID string `json:"request_id,omitempty"`
Source string `json:"source,omitempty"`
AuthIdentity string `json:"auth_identity,omitempty"`
ImageRef string `json:"image_ref,omitempty"`
ServerName string `json:"server_name,omitempty"`
DeploymentTarget string `json:"deployment_target,omitempty"`
AgentID string `json:"agent_id,omitempty"`
TeamID string `json:"team_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
AuditLog is the read-side platform audit record.
type Client ¶
Client calls platform-api's /internal endpoints with the service token.
func (*Client) AbortImagePublication ¶
func (c *Client) AbortImagePublication(ctx context.Context, publicationID string, req apikit.ImagePublicationAbortRequest) (apikit.ImagePublicationIntent, error)
func (*Client) ActivateEnrollmentIntent ¶
func (c *Client) ActivateEnrollmentIntent(ctx context.Context, opID string, req apikit.EnrollmentIntentActivateRequest) (apikit.EnrollmentIntent, error)
func (*Client) AgentCertificates ¶
func (*Client) BeginImagePublication ¶
func (c *Client) BeginImagePublication(ctx context.Context, req apikit.ImagePublicationBeginRequest) (apikit.ImagePublicationIntent, error)
func (*Client) ClaimAccessIntentObserverLease ¶
func (*Client) ClaimAgentCleanupIntentFence ¶
func (*Client) ClaimDeploymentIntentFence ¶
func (*Client) ClaimEnrollmentIntentFence ¶
func (*Client) ClaimGrantIntentFence ¶
func (*Client) ClaimImagePublicationFence ¶
func (*Client) ClaimRestartOperationFence ¶
func (*Client) ClaimServerIntentFence ¶
func (*Client) ClaimTeamIntentFence ¶
func (*Client) ClaimTeamIntentObserverLease ¶
func (*Client) ClaimWorkloadObserverLease ¶
func (*Client) CompleteSessionEnrollment ¶
func (*Client) Configured ¶
Configured reports whether the client can reach platform-api.
func (*Client) CreateAgent ¶
func (*Client) CreateEnrollmentIntent ¶
func (c *Client) CreateEnrollmentIntent(ctx context.Context, req apikit.EnrollmentIntentCreateRequest) (apikit.EnrollmentIntent, error)
func (*Client) CreatePasswordUser ¶
func (*Client) CreateRestartOperation ¶
func (c *Client) CreateRestartOperation(ctx context.Context, req apikit.RestartOperationCreateRequest) (apikit.RestartOperationIntent, error)
func (*Client) CreateTeam ¶
func (*Client) CreateTeamUser ¶
func (*Client) DeleteDeploymentIntent ¶
func (c *Client) DeleteDeploymentIntent(ctx context.Context, deploymentID string, req apikit.DeploymentIntentDeleteRequest) (apikit.DeploymentIntent, error)
func (*Client) DeletePendingSession ¶
func (*Client) DeleteSession ¶
func (*Client) DeleteSessionIfUID ¶
func (*Client) DeleteTeamBySlug ¶
func (*Client) DeleteTeamMembership ¶
func (*Client) FinalizeImagePublication ¶
func (c *Client) FinalizeImagePublication(ctx context.Context, publicationID string, req apikit.ImagePublicationFinalizeRequest) (apikit.ImagePublicationIntent, error)
func (*Client) GetAgentCleanupIntent ¶
func (*Client) GetDeploymentIntent ¶
func (*Client) GetEnrollmentIntent ¶
func (*Client) GetGrantIntent ¶
func (*Client) GetImagePublicationIntent ¶
func (*Client) GetNamespace ¶
func (*Client) GetRestartOperationIntent ¶
func (*Client) GetServerIntent ¶
func (*Client) GetSession ¶
func (*Client) GetTeamBySlug ¶
func (*Client) GetTeamIntent ¶
func (*Client) ListAgents ¶
func (*Client) ListDeploymentIntents ¶
func (*Client) ListEnrollmentIntents ¶
func (*Client) ListGrantIntents ¶
func (*Client) ListImagePublicationIntents ¶
func (*Client) ListNamespaces ¶
func (*Client) ListRestartOperationIntents ¶
func (*Client) ListServerIntents ¶
func (*Client) ListSessions ¶
func (c *Client) ListSessions(ctx context.Context, namespace string) ([]sessionstate.Session, error)
ListSessions drains bounded pages. Management callers retain the existing list contract; the gateway snapshot uses its separate authenticated audience.
func (*Client) ListSessionsFiltered ¶
func (c *Client) ListSessionsFiltered(ctx context.Context, filter sessionstate.Filter) ([]sessionstate.Session, error)
func (*Client) ListTeamIntents ¶
func (*Client) ListTeamMemberships ¶
func (*Client) OperationsSnapshot ¶
func (c *Client) OperationsSnapshot(ctx context.Context, filter OperationsFilter) (OperationsSnapshot, error)
OperationsSnapshot loads user, audit, and image activity for admin operations.
func (*Client) OverviewCounts ¶
func (*Client) PrincipalForUserID ¶
func (*Client) PutSession ¶
func (c *Client) PutSession(ctx context.Context, item sessionstate.Session) (sessionstate.Session, error)
func (*Client) RecordAgentCleanupIntentReceipt ¶
func (c *Client) RecordAgentCleanupIntentReceipt(ctx context.Context, agentID string, req apikit.AgentCleanupReceiptRequest) (apikit.AgentCleanupReceipt, error)
func (*Client) RecordDeploymentIntentObservation ¶
func (c *Client) RecordDeploymentIntentObservation(ctx context.Context, deploymentID string, req apikit.DeploymentIntentObservationRequest) (apikit.WorkloadStatusObservation, error)
func (*Client) RecordDeploymentIntentReceipt ¶
func (c *Client) RecordDeploymentIntentReceipt(ctx context.Context, deploymentID string, req apikit.DeploymentIntentReceiptRequest) (apikit.WorkloadExecutionReceipt, error)
func (*Client) RecordEnrollmentIntentReceipt ¶
func (c *Client) RecordEnrollmentIntentReceipt(ctx context.Context, opID string, req apikit.EnrollmentIntentReceiptRequest) (apikit.EnrollmentReceipt, error)
func (*Client) RecordGrantIntentObservation ¶
func (c *Client) RecordGrantIntentObservation(ctx context.Context, grantID string, req apikit.GrantIntentObservationRequest) (apikit.GrantObservation, error)
func (*Client) RecordGrantIntentReceipt ¶
func (c *Client) RecordGrantIntentReceipt(ctx context.Context, grantID string, req apikit.GrantIntentReceiptRequest) (apikit.GrantReceipt, error)
func (*Client) RecordImagePublicationReceipt ¶
func (c *Client) RecordImagePublicationReceipt(ctx context.Context, publicationID string, req apikit.ImagePublicationReceiptRequest) (apikit.WorkloadExecutionReceipt, error)
func (*Client) RecordRestartComponentCheckpoint ¶
func (c *Client) RecordRestartComponentCheckpoint(ctx context.Context, operationID string, req apikit.RestartComponentCheckpointRequest) (apikit.RestartOperationIntent, error)
func (*Client) RecordRestartOperationReceipt ¶
func (c *Client) RecordRestartOperationReceipt(ctx context.Context, operationID string, req apikit.RestartOperationReceiptRequest) (apikit.WorkloadExecutionReceipt, error)
func (*Client) RecordServerIntentObservation ¶
func (c *Client) RecordServerIntentObservation(ctx context.Context, serverID string, req apikit.ServerIntentObservationRequest) (apikit.WorkloadStatusObservation, error)
func (*Client) RecordServerIntentReceipt ¶
func (c *Client) RecordServerIntentReceipt(ctx context.Context, serverID string, req apikit.ServerIntentReceiptRequest) (apikit.WorkloadExecutionReceipt, error)
func (*Client) RecordServerRetirementCheckpoint ¶
func (c *Client) RecordServerRetirementCheckpoint(ctx context.Context, serverID string, req apikit.ServerRetirementCheckpointRequest) (apikit.ServerIntent, error)
func (*Client) RecordTeamIntentObservation ¶
func (c *Client) RecordTeamIntentObservation(ctx context.Context, teamID string, req apikit.TeamIntentObservationRequest) (apikit.TeamNamespaceObservation, error)
func (*Client) RecordTeamIntentReceipt ¶
func (c *Client) RecordTeamIntentReceipt(ctx context.Context, teamID string, req apikit.TeamIntentReceiptRequest) (apikit.TeamNamespaceReceipt, error)
func (*Client) RenameAgent ¶
func (*Client) RetireServerIntent ¶
func (c *Client) RetireServerIntent(ctx context.Context, serverID string, req apikit.ServerIntentRetireRequest) (apikit.ServerIntent, error)
func (*Client) RevokeGrantIntent ¶
func (*Client) RevokeSession ¶
func (*Client) RevokeSessions ¶
func (*Client) SetAgentStatus ¶
func (*Client) SetSessionRevoked ¶
func (*Client) UpsertDeploymentIntent ¶
func (c *Client) UpsertDeploymentIntent(ctx context.Context, req apikit.DeploymentIntentUpsertRequest) (apikit.DeploymentIntent, error)
func (*Client) UpsertGrantIntent ¶
func (c *Client) UpsertGrantIntent(ctx context.Context, req apikit.GrantIntentUpsertRequest) (apikit.GrantIntent, error)
func (*Client) UpsertServerIntent ¶
func (c *Client) UpsertServerIntent(ctx context.Context, req apikit.ServerIntentUpsertRequest) (apikit.ServerIntent, error)
func (*Client) UpsertTeamMembership ¶
func (*Client) WriteAudit ¶
func (c *Client) WriteAudit(ctx context.Context, event AuditEvent)
WriteAudit posts an audit event to platform-api.
type ImageActivity ¶
type ImageActivity struct {
UserID string `json:"user_id,omitempty"`
Email string `json:"email,omitempty"`
Namespace string `json:"namespace,omitempty"`
ImageRef string `json:"image_ref"`
SourceImage string `json:"source_image,omitempty"`
ServerName string `json:"server_name,omitempty"`
DeploymentTarget string `json:"deployment_target,omitempty"`
Action string `json:"action"`
Status string `json:"status"`
Source string `json:"source,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ImageActivity describes image publish or deploy-related audit entries.
type OperationsFilter ¶
type OperationsFilter struct {
User string
UserSearch string
TraceID string
Since time.Time
Until time.Time
Limit int
}
OperationsFilter constrains platform operations and activity queries.
type OperationsFilterResponse ¶
type OperationsFilterResponse struct {
User string `json:"user,omitempty"`
Since string `json:"since,omitempty"`
Until string `json:"until,omitempty"`
Limit int `json:"limit"`
}
OperationsFilterResponse is the API echo of an operations filter.
type OperationsSnapshot ¶
type OperationsSnapshot struct {
Users []UserActivity `json:"users"`
AuditLogs []AuditLog `json:"audit_logs"`
Images []ImageActivity `json:"images"`
}
OperationsSnapshot is the platform activity bundle for admin operations.
type TeamMembership ¶
type TeamMembership = apikit.TeamMembership
TeamMembership is the platform team membership API contract.
type UserActivity ¶
type UserActivity struct {
ID string `json:"id"`
Email string `json:"email"`
Role string `json:"role"`
Namespace string `json:"namespace,omitempty"`
CreatedAt time.Time `json:"created_at"`
LastLoginAt *time.Time `json:"last_login_at,omitempty"`
LastActivityAt *time.Time `json:"last_activity_at,omitempty"`
LoginCount int64 `json:"login_count"`
FailedActionCount int64 `json:"failed_action_count"`
RegistryCredentials int64 `json:"registry_credentials"`
APIKeys int64 `json:"api_keys"`
}
UserActivity summarizes recent platform activity for a user account.