controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(cfg *config.Config) error

func NewHandler

func NewHandler(svc *Service) (http.Handler, error)

func Run

func Run(cfg *config.Config) error

func Unbootstrap

func Unbootstrap(cfg *config.Config) error

Types

type Controller

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

func New

func New(cfg *config.Config) (*Controller, error)

type Service

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

func NewService

func NewService(cfg *config.Config, store *persistence.Store) *Service

func (*Service) AcceptSession

func (*Service) AddTunnelGrant

func (*Service) ChangePassword

func (s *Service) ChangePassword(ctx context.Context, req *api.ChangePasswordRequest) (api.ChangePasswordRes, error)

func (*Service) CloseSession

func (*Service) ConnectTunnel

func (s *Service) ConnectTunnel(ctx context.Context, req *api.ConnectTunnelRequest) (api.ConnectTunnelRes, error)

func (*Service) CreateAccount

func (*Service) CreateContract

func (s *Service) CreateContract(ctx context.Context, req *api.CreateContractRequest) (api.CreateContractRes, error)

func (*Service) CreateOrganization

func (s *Service) CreateOrganization(ctx context.Context, req *api.CreateOrganizationRequest) (api.CreateOrganizationRes, error)

func (*Service) CreateTunnel

func (s *Service) CreateTunnel(ctx context.Context, req *api.CreateTunnelRequest) (api.CreateTunnelRes, error)

func (*Service) CreateWorkgroup

func (s *Service) CreateWorkgroup(ctx context.Context, req *api.CreateWorkgroupRequest) (api.CreateWorkgroupRes, error)

func (*Service) DeleteAccount

func (s *Service) DeleteAccount(ctx context.Context, params api.DeleteAccountParams) (api.DeleteAccountRes, error)

func (*Service) DeleteContract

func (s *Service) DeleteContract(ctx context.Context, params api.DeleteContractParams) (api.DeleteContractRes, error)

func (*Service) DeleteOrganization

func (s *Service) DeleteOrganization(ctx context.Context, params api.DeleteOrganizationParams) (api.DeleteOrganizationRes, error)

func (*Service) DeleteTunnel

func (s *Service) DeleteTunnel(ctx context.Context, params api.DeleteTunnelParams) (api.DeleteTunnelRes, error)

func (*Service) DeleteTunnelAttachment

func (s *Service) DeleteTunnelAttachment(ctx context.Context, params api.DeleteTunnelAttachmentParams) (api.DeleteTunnelAttachmentRes, error)

func (*Service) DeleteTunnelServe

func (s *Service) DeleteTunnelServe(ctx context.Context, params api.DeleteTunnelServeParams) (api.DeleteTunnelServeRes, error)

func (*Service) DeleteWorkgroup

func (s *Service) DeleteWorkgroup(ctx context.Context, params api.DeleteWorkgroupParams) (api.DeleteWorkgroupRes, error)

func (*Service) DisableEnvironment

func (s *Service) DisableEnvironment(ctx context.Context, params api.DisableEnvironmentParams) (api.DisableEnvironmentRes, error)

func (*Service) EnableEnvironment

func (s *Service) EnableEnvironment(ctx context.Context, req *api.EnableEnvironmentRequest) (api.EnableEnvironmentRes, error)

func (*Service) GetAdvertisement

func (s *Service) GetAdvertisement(ctx context.Context, params api.GetAdvertisementParams) (api.GetAdvertisementRes, error)

func (*Service) GetContract

func (s *Service) GetContract(ctx context.Context, params api.GetContractParams) (api.GetContractRes, error)

func (*Service) GetDashboardActivity

func (s *Service) GetDashboardActivity(ctx context.Context, params api.GetDashboardActivityParams) (api.GetDashboardActivityRes, error)

func (*Service) GetDashboardEnvironments

func (s *Service) GetDashboardEnvironments(ctx context.Context) (api.GetDashboardEnvironmentsRes, error)

func (*Service) GetDashboardSummary

func (s *Service) GetDashboardSummary(ctx context.Context) (api.GetDashboardSummaryRes, error)

func (*Service) GetEnvironment

func (s *Service) GetEnvironment(ctx context.Context, params api.GetEnvironmentParams) (api.GetEnvironmentRes, error)

func (*Service) GetSession

func (s *Service) GetSession(ctx context.Context, params api.GetSessionParams) (api.GetSessionRes, error)

func (*Service) GetTunnel

func (s *Service) GetTunnel(ctx context.Context, params api.GetTunnelParams) (api.GetTunnelRes, error)

func (*Service) GetTunnelServe

func (s *Service) GetTunnelServe(ctx context.Context, params api.GetTunnelServeParams) (api.GetTunnelServeRes, error)

func (*Service) GetWorkgroup

func (s *Service) GetWorkgroup(ctx context.Context, params api.GetWorkgroupParams) (api.GetWorkgroupRes, error)

func (*Service) GetWorkgroupsActivity

func (s *Service) GetWorkgroupsActivity(ctx context.Context, params api.GetWorkgroupsActivityParams) (api.GetWorkgroupsActivityRes, error)

func (*Service) HandleAccountTokenAuth

func (s *Service) HandleAccountTokenAuth(ctx context.Context, _ api.OperationName, token api.AccountTokenAuth) (context.Context, error)

func (*Service) HandleAdminTokenAuth

func (s *Service) HandleAdminTokenAuth(ctx context.Context, _ api.OperationName, token api.AdminTokenAuth) (context.Context, error)

func (*Service) HeartbeatEnvironment

func (s *Service) HeartbeatEnvironment(ctx context.Context, params api.HeartbeatEnvironmentParams) (api.HeartbeatEnvironmentRes, error)

func (*Service) HeartbeatTunnelAttachment

func (s *Service) HeartbeatTunnelAttachment(ctx context.Context, params api.HeartbeatTunnelAttachmentParams) (api.HeartbeatTunnelAttachmentRes, error)

func (*Service) HeartbeatTunnelServe

func (s *Service) HeartbeatTunnelServe(ctx context.Context, params api.HeartbeatTunnelServeParams) (api.HeartbeatTunnelServeRes, error)

func (*Service) ListAccounts

func (s *Service) ListAccounts(ctx context.Context, params api.ListAccountsParams) (api.ListAccountsRes, error)

func (*Service) ListAdminWorkgroups

func (s *Service) ListAdminWorkgroups(ctx context.Context, params api.ListAdminWorkgroupsParams) (api.ListAdminWorkgroupsRes, error)

func (*Service) ListAdvertisements

func (s *Service) ListAdvertisements(ctx context.Context, params api.ListAdvertisementsParams) (api.ListAdvertisementsRes, error)

func (*Service) ListAuditEvents

func (s *Service) ListAuditEvents(ctx context.Context, params api.ListAuditEventsParams) (api.ListAuditEventsRes, error)

func (*Service) ListContracts

func (s *Service) ListContracts(ctx context.Context) (api.ListContractsRes, error)

func (*Service) ListEnvironments

func (s *Service) ListEnvironments(ctx context.Context) (api.ListEnvironmentsRes, error)

func (*Service) ListOrganizations

func (s *Service) ListOrganizations(ctx context.Context) (api.ListOrganizationsRes, error)

func (*Service) ListSessions

func (s *Service) ListSessions(ctx context.Context, params api.ListSessionsParams) (api.ListSessionsRes, error)

func (*Service) ListTunnelAttachments

func (s *Service) ListTunnelAttachments(ctx context.Context, params api.ListTunnelAttachmentsParams) (api.ListTunnelAttachmentsRes, error)

func (*Service) ListTunnelGrants

func (s *Service) ListTunnelGrants(ctx context.Context, params api.ListTunnelGrantsParams) (api.ListTunnelGrantsRes, error)

func (*Service) ListTunnels

func (s *Service) ListTunnels(ctx context.Context, params api.ListTunnelsParams) (api.ListTunnelsRes, error)

func (*Service) ListUsers

func (s *Service) ListUsers(ctx context.Context, params api.ListUsersParams) (api.ListUsersRes, error)

func (*Service) ListWorkgroupMembers

func (s *Service) ListWorkgroupMembers(ctx context.Context, params api.ListWorkgroupMembersParams) (api.ListWorkgroupMembersRes, error)

func (*Service) ListWorkgroups

func (s *Service) ListWorkgroups(ctx context.Context) (api.ListWorkgroupsRes, error)

func (*Service) Login

func (s *Service) Login(ctx context.Context, req *api.LoginRequest) (api.LoginRes, error)

func (*Service) Logout

func (s *Service) Logout(ctx context.Context) error

func (*Service) ProposeSession

func (s *Service) ProposeSession(ctx context.Context, req *api.ProposeSessionRequest) (api.ProposeSessionRes, error)

func (*Service) PublishAdvertisement

func (*Service) ReapExpiredSessions

func (s *Service) ReapExpiredSessions(ctx context.Context, now time.Time) error

ReapExpiredSessions evaluates each active session with a positive duration cap on its snapshot and closes it with reason=contract_violation if `now - accepted_at >= max_duration_seconds`.

func (*Service) ReapStaleTunnelAttachments

func (s *Service) ReapStaleTunnelAttachments(ctx context.Context, now time.Time) error

func (*Service) ReapStaleTunnelServes

func (s *Service) ReapStaleTunnelServes(ctx context.Context, now time.Time) error

func (*Service) RegenerateAccountToken

func (s *Service) RegenerateAccountToken(ctx context.Context, req *api.RegenerateTokenRequest) (api.RegenerateAccountTokenRes, error)

func (*Service) RejectSession

func (*Service) RemoveTunnelGrant

func (s *Service) RemoveTunnelGrant(ctx context.Context, params api.RemoveTunnelGrantParams) (api.RemoveTunnelGrantRes, error)

func (*Service) RemoveWorkgroupMember

func (s *Service) RemoveWorkgroupMember(ctx context.Context, params api.RemoveWorkgroupMemberParams) (api.RemoveWorkgroupMemberRes, error)

func (*Service) RetractAdvertisement

func (s *Service) RetractAdvertisement(ctx context.Context, params api.RetractAdvertisementParams) (api.RetractAdvertisementRes, error)

func (*Service) RunSessionDurationReaper

func (s *Service) RunSessionDurationReaper(ctx context.Context)

RunSessionDurationReaper loops until ctx is done, periodically closing active sessions whose contract snapshot's max_duration_seconds has elapsed since accept.

func (*Service) RunTunnelAttachmentReaper

func (s *Service) RunTunnelAttachmentReaper(ctx context.Context)

func (*Service) RunTunnelServeReaper

func (s *Service) RunTunnelServeReaper(ctx context.Context)

func (*Service) SearchCatalog

func (s *Service) SearchCatalog(ctx context.Context, params api.SearchCatalogParams) (api.SearchCatalogRes, error)

func (*Service) StartTunnelServe

func (*Service) UpdateContract

func (*Service) Whoami

func (s *Service) Whoami(ctx context.Context) (api.WhoamiRes, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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