Documentation
¶
Index ¶
- Variables
- type ControlPlaneOption
- func WithAuthInterceptor(interceptor *cauth.Interceptor) ControlPlaneOption
- func WithControlPlaneBillingRepository(repository trustedai.BillingRepository) ControlPlaneOption
- func WithControlPlaneCredentialRepository(repository trustedai.CredentialRepository) ControlPlaneOption
- func WithControlPlaneLogger(logger *slog.Logger) ControlPlaneOption
- func WithControlPlaneModelRepository(repository trustedai.ModelRepository) ControlPlaneOption
- func WithControlPlaneOrganizationRepository(repository trustedai.OrganizationRepository) ControlPlaneOption
- func WithControlPlaneProviderRepository(repository trustedai.ProviderRepository) ControlPlaneOption
- func WithControlPlaneTokenRepository(repository trustedai.TokenRepository) ControlPlaneOption
- func WithControlPlaneUsageRepository(repository trustedai.UsageRepository) ControlPlaneOption
- func WithControlPlaneUserRepository(repository trustedai.UserRepository) ControlPlaneOption
- func WithFrontendFS(frontendFS fs.FS) ControlPlaneOption
- func WithSSOHandler(handler http.Handler) ControlPlaneOption
- func WithSessionStore(store auth.SessionStore) ControlPlaneOption
- func WithTokenInterceptor(interceptor *cauth.TokenInterceptor) ControlPlaneOption
- type ControlPlaneServer
Constants ¶
This section is empty.
Variables ¶
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()