controlplane

package
v0.0.0-...-30b5f87 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalControlPlaneOptions []ControlPlaneOption

GlobalControlPlaneOptions is a list of [ControlPlaneOption]s that are applied to all [ControlPlaneServer]s.

Functions

This section is empty.

Types

type ControlPlaneOption

type ControlPlaneOption interface {
	// contains filtered or unexported methods
}

ControlPlaneOption is an option for configuring a ControlPlaneServer.

func WithAuthInterceptor

func WithAuthInterceptor(interceptor *cauth.Interceptor) ControlPlaneOption

WithAuthInterceptor returns a ControlPlaneOption that uses the provided auth interceptor.

func WithControlPlaneBillingRepository

func WithControlPlaneBillingRepository(repository trustedai.BillingRepository) ControlPlaneOption

WithControlPlaneBillingRepository returns a ControlPlaneOption that uses the provided BillingRepository.

func WithControlPlaneCredentialRepository

func WithControlPlaneCredentialRepository(repository trustedai.CredentialRepository) ControlPlaneOption

WithControlPlaneCredentialRepository returns a ControlPlaneOption that uses the provided CredentialRepository.

func WithControlPlaneLogger

func WithControlPlaneLogger(logger *slog.Logger) ControlPlaneOption

WithControlPlaneLogger returns a ControlPlaneOption that uses the provided logger.

func WithControlPlaneModelRepository

func WithControlPlaneModelRepository(repository trustedai.ModelRepository) ControlPlaneOption

WithControlPlaneModelRepository returns a ControlPlaneOption that uses the provided ModelRepository.

func WithControlPlaneOrganizationRepository

func WithControlPlaneOrganizationRepository(repository trustedai.OrganizationRepository) ControlPlaneOption

WithControlPlaneOrganizationRepository returns a ControlPlaneOption that uses the provided OrganizationRepository.

func WithControlPlaneProviderRepository

func WithControlPlaneProviderRepository(repository trustedai.ProviderRepository) ControlPlaneOption

WithControlPlaneProviderRepository returns a ControlPlaneOption that uses the provided ProviderRepository.

func WithControlPlaneTokenRepository

func WithControlPlaneTokenRepository(repository trustedai.TokenRepository) ControlPlaneOption

WithControlPlaneTokenRepository returns a ControlPlaneOption that uses the provided TokenRepository.

func WithControlPlaneUsageRepository

func WithControlPlaneUsageRepository(repository trustedai.UsageRepository) ControlPlaneOption

WithControlPlaneUsageRepository returns a ControlPlaneOption that uses the provided UsageRepository.

func WithControlPlaneUserRepository

func WithControlPlaneUserRepository(repository trustedai.UserRepository) ControlPlaneOption

WithControlPlaneUserRepository returns a ControlPlaneOption that uses the provided UserRepository.

func WithFrontendFS

func WithFrontendFS(frontendFS fs.FS) ControlPlaneOption

WithFrontendFS returns a ControlPlaneOption that uses the provided filesystem for frontend files.

func WithSSOHandler

func WithSSOHandler(handler http.Handler) ControlPlaneOption

WithSSOHandler returns a ControlPlaneOption that uses the provided SSO handler.

func WithSessionStore

func WithSessionStore(store auth.SessionStore) ControlPlaneOption

WithSessionStore returns a ControlPlaneOption that uses the provided session store.

func WithTokenInterceptor

func WithTokenInterceptor(interceptor *cauth.TokenInterceptor) ControlPlaneOption

WithTokenInterceptor returns a ControlPlaneOption that uses the provided token interceptor.

type ControlPlaneServer

type ControlPlaneServer struct {
	// contains filtered or unexported fields
}

func NewControlPlaneServer

func NewControlPlaneServer(options ...ControlPlaneOption) (*ControlPlaneServer, error)

NewControlPlaneServer creates a new ControlPlaneServer.

func (*ControlPlaneServer) GetMux

func (s *ControlPlaneServer) GetMux() *http.ServeMux

GetMux returns the HTTP mux for the server

func (*ControlPlaneServer) Run

func (s *ControlPlaneServer) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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