internalapi

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

Overview

Package internalapi holds shared request/response DTOs for platform-api /internal/* endpoints. Provider and consumer services import these structs so field renames become compile errors across the split.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID            string     `json:"id"`
	TeamID        string     `json:"team_id"`
	TeamSlug      string     `json:"team_slug"`
	Name          string     `json:"name"`
	Status        string     `json:"status"`
	CreatedBy     string     `json:"created_by,omitempty"`
	CreatedAt     time.Time  `json:"created_at"`
	UpdatedAt     time.Time  `json:"updated_at"`
	DeactivatedAt *time.Time `json:"deactivated_at,omitempty"`
	DeactivatedBy string     `json:"deactivated_by,omitempty"`
}

type AgentCreateRequest

type AgentCreateRequest struct {
	Name      string `json:"name"`
	CreatedBy string `json:"created_by"`
}

type AgentPage

type AgentPage struct {
	Agents     []Agent `json:"agents"`
	NextCursor string  `json:"next_cursor,omitempty"`
}

type AgentRenameRequest

type AgentRenameRequest struct {
	Name string `json:"name"`
}

type AuditEvent

type AuditEvent struct {
	UserID           string `json:"user_id,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"`
}

AuditEvent is POST /internal/audit.

type AuthResolveRequest

type AuthResolveRequest struct {
	APIKey string `json:"api_key"`
}

AuthResolveRequest is POST /internal/auth/resolve.

type AuthResolveResponse

type AuthResolveResponse struct {
	OK        bool                   `json:"ok"`
	Principal platformauth.Principal `json:"principal,omitempty"`
}

AuthResolveResponse is POST /internal/auth/resolve.

type CreateUserRequest

type CreateUserRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Role     string `json:"role"`
}

CreateUserRequest is POST /internal/identity/users.

type CreateUserResponse

type CreateUserResponse struct {
	User User `json:"user"`
}

CreateUserResponse is POST /internal/identity/users.

type NamespacesListResponse

type NamespacesListResponse struct {
	Namespaces []map[string]any `json:"namespaces"`
}

NamespacesListResponse is GET /internal/identity/namespaces.

type PrincipalResolveRequest

type PrincipalResolveRequest struct {
	UserID string `json:"user_id"`
}

PrincipalResolveRequest is POST /internal/identity/principal.

type PrincipalResolveResponse

type PrincipalResolveResponse struct {
	Principal platformauth.Principal `json:"principal"`
}

PrincipalResolveResponse is POST /internal/identity/principal.

type ResolveIDsRequest

type ResolveIDsRequest struct {
	UserIDs []string `json:"user_ids"`
	TeamIDs []string `json:"team_ids"`
}

ResolveIDsRequest is POST /internal/identity/resolve-ids.

type ResolveIDsResponse

type ResolveIDsResponse struct {
	Users map[string]string `json:"users"`
	Teams map[string]string `json:"teams"`
}

ResolveIDsResponse is POST /internal/identity/resolve-ids.

type Team

type Team struct {
	ID        string    `json:"id"`
	Slug      string    `json:"slug"`
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
	CreatedAt time.Time `json:"created_at"`
}

Team is a managed platform team and its Kubernetes namespace.

type TeamCreateRequest

type TeamCreateRequest struct {
	Slug            string `json:"slug"`
	Name            string `json:"name"`
	CreatedByUserID string `json:"created_by_user_id"`
}

TeamCreateRequest is POST /internal/identity/teams.

type TeamMembersListResponse

type TeamMembersListResponse struct {
	Members []TeamMembership `json:"members"`
}

TeamMembersListResponse is GET /internal/identity/teams/{slug}/members.

type TeamMembership

type TeamMembership = platform.TeamMembership

TeamMembership is the platform team membership API contract.

type TeamMembershipPutRequest

type TeamMembershipPutRequest struct {
	Role   string `json:"role"`
	UserID string `json:"userID"`
}

TeamMembershipPutRequest is PUT /internal/identity/teams/{slug}/members/{userID}.

type TeamMembershipResponse

type TeamMembershipResponse struct {
	Membership TeamMembership `json:"membership"`
}

TeamMembershipResponse wraps a membership mutation result.

type TeamMembershipUpsertRequest

type TeamMembershipUpsertRequest struct {
	UserID string `json:"userID"`
	Role   string `json:"role"`
}

TeamMembershipUpsertRequest is POST /internal/identity/teams/{slug}/members.

type TeamUserCreateRequest

type TeamUserCreateRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Role     string `json:"role"`
}

TeamUserCreateRequest is POST /internal/identity/teams/{slug}/users.

type TeamUserCreateResponse

type TeamUserCreateResponse struct {
	User       User           `json:"user"`
	Membership TeamMembership `json:"membership"`
}

TeamUserCreateResponse is POST /internal/identity/teams/{slug}/users.

type TeamsListResponse

type TeamsListResponse struct {
	Teams []Team `json:"teams"`
}

TeamsListResponse is GET /internal/identity/teams.

type User

type User struct {
	ID    string `json:"id"`
	Email string `json:"email"`
	Role  string `json:"role"`
}

User is a platform user record returned by identity APIs.

Jump to

Keyboard shortcuts

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