Documentation ¶
Index ¶
- func NewTokenAuthFilter(...) restmachinery.Filter
- type AuthnEndpoints
- type EventsEndpoints
- type JobsEndpoints
- type LogsEndpoints
- type PingResponse
- type ProjectRoleAssignmentsEndpoints
- type ProjectsEndpoints
- type RoleAssignmentsEndpoints
- type SecretsEndpoints
- type ServiceAccountEndpoints
- type SessionsEndpoints
- type SubstrateEndpoints
- type SystemEndpoints
- type TokenAuthFilterConfig
- type UsersEndpoints
- type WorkersEndpoints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenAuthFilter ¶
func NewTokenAuthFilter( findServiceAccountByTokenFn func( ctx context.Context, token string, ) (api.ServiceAccount, error), findSessionFn func(ctx context.Context, token string) (api.Session, error), findEventByTokenFn func( ctx context.Context, token string, ) (api.Event, error), config *TokenAuthFilterConfig, ) restmachinery.Filter
NewTokenAuthFilter returns an implementation of the restmachinery.Filter interface that decorates an http.HandlerFunc to carry out request authentication by extracting an opaque bearer token form the HTTP Authorization header and using that token to locate an established Session.
Types ¶
type AuthnEndpoints ¶ added in v2.3.0
type AuthnEndpoints struct { AuthFilter restmachinery.Filter Service api.PrincipalsService }
func (*AuthnEndpoints) Register ¶ added in v2.3.0
func (a *AuthnEndpoints) Register(router *mux.Router)
type EventsEndpoints ¶
type EventsEndpoints struct { AuthFilter restmachinery.Filter EventSchemaLoader gojsonschema.JSONLoader SourceStateSchemaLoader gojsonschema.JSONLoader EventSummarySchemaLoader gojsonschema.JSONLoader Service api.EventsService }
func (*EventsEndpoints) Register ¶
func (e *EventsEndpoints) Register(router *mux.Router)
type JobsEndpoints ¶
type JobsEndpoints struct { AuthFilter restmachinery.Filter JobSchemaLoader gojsonschema.JSONLoader JobStatusSchemaLoader gojsonschema.JSONLoader Service api.JobsService }
JobsEndpoints implements restmachinery.Endpoints to provide Job-related URL --> action mappings to a restmachinery.Server.
func (*JobsEndpoints) Register ¶
func (j *JobsEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register Job-related URL --> action mappings to a restmachinery.Server.
type LogsEndpoints ¶
type LogsEndpoints struct { AuthFilter restmachinery.Filter Service api.LogsService }
LogsEndpoints implements restmachinery.Endpoints to provide log-related URL --> action mappings to a restmachinery.Server.
func (*LogsEndpoints) Register ¶
func (l *LogsEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register log-related URL --> action mappings to a restmachinery.Server.
type PingResponse ¶
PingResponse represents the response object returned by the ping endpoint
func (PingResponse) MarshalJSON ¶
func (p PingResponse) MarshalJSON() ([]byte, error)
MarshalJSON amends PingResponse instances with type metadata.
type ProjectRoleAssignmentsEndpoints ¶
type ProjectRoleAssignmentsEndpoints struct { AuthFilter restmachinery.Filter ProjectRoleAssignmentSchemaLoader gojsonschema.JSONLoader Service api.ProjectRoleAssignmentsService }
ProjectRoleAssignmentsEndpoints implements restmachinery.Endpoints to provide ProjectRoleAssignment-related URL --> action mappings to a restmachinery.Server.
func (*ProjectRoleAssignmentsEndpoints) Register ¶
func (p *ProjectRoleAssignmentsEndpoints) Register(router *mux.Router)
type ProjectsEndpoints ¶
type ProjectsEndpoints struct { AuthFilter restmachinery.Filter ProjectSchemaLoader gojsonschema.JSONLoader Service api.ProjectsService }
ProjectsEndpoints implements restmachinery.Endpoints to provide Project-related URL --> action mappings to a restmachinery.Server.
func (*ProjectsEndpoints) Register ¶
func (p *ProjectsEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register Project-related URL --> action mappings to a restmachinery.Server.
type RoleAssignmentsEndpoints ¶
type RoleAssignmentsEndpoints struct { AuthFilter restmachinery.Filter RoleAssignmentSchemaLoader gojsonschema.JSONLoader Service api.RoleAssignmentsService }
RoleAssignmentsEndpoints implements restmachinery.Endpoints to provide RoleAssignments-related URL --> action mappings to a restmachinery.Server.
func (*RoleAssignmentsEndpoints) Register ¶
func (r *RoleAssignmentsEndpoints) Register(router *mux.Router)
type SecretsEndpoints ¶
type SecretsEndpoints struct { AuthFilter restmachinery.Filter SecretSchemaLoader gojsonschema.JSONLoader Service api.SecretsService }
func (*SecretsEndpoints) Register ¶
func (s *SecretsEndpoints) Register(router *mux.Router)
type ServiceAccountEndpoints ¶
type ServiceAccountEndpoints struct { AuthFilter restmachinery.Filter ServiceAccountSchemaLoader gojsonschema.JSONLoader Service api.ServiceAccountsService }
func (*ServiceAccountEndpoints) Register ¶
func (s *ServiceAccountEndpoints) Register(router *mux.Router)
type SessionsEndpoints ¶
type SessionsEndpoints struct { AuthFilter restmachinery.Filter Service api.SessionsService }
SessionsEndpoints implements restmachinery.Endpoints to provide Session-related URL --> action mappings to a restmachinery.Server.
func (*SessionsEndpoints) Register ¶
func (s *SessionsEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register Session-related URL --> action mappings to a restmachinery.Server.
type SubstrateEndpoints ¶
type SubstrateEndpoints struct { AuthFilter restmachinery.Filter Service api.SubstrateService }
SubstrateEndpoints implements restmachinery.Endpoints to provide Substrate-related URL --> action mappings to a restmachinery.Server.
func (*SubstrateEndpoints) Register ¶
func (s *SubstrateEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register Project-related URL --> action mappings to a restmachinery.Server.
type SystemEndpoints ¶
type SystemEndpoints struct { DatabaseClient *mongo.Client WriterFactory queue.WriterFactory }
SystemEndpoints implements restmachinery.Endpoints to provide System-related URL --> action mappings to a restmachinery.Server.
func (*SystemEndpoints) Register ¶
func (h *SystemEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register System-related URL --> action mappings to a restmachinery.Server.
type TokenAuthFilterConfig ¶
type TokenAuthFilterConfig struct { // RootUserEnabled indicates whether the TokenAuthFilter should permit the // "root" user to authenticate using a password. RootUserEnabled bool // ThirdPartyAuthEnabled indicates whether the TokenAuthFilter service should // permit User authentication via third-parties. ThirdPartyAuthEnabled bool // FindUserFn is a function for locating a User. This field is applicable only // when the value of the ThirdPartyAuthEnabled field is true. FindUserFn func(ctx context.Context, id string) (api.User, error) // HashedSchedulerToken is a secure hash of the token used by the scheduler // component. HashedSchedulerToken string // HashedObserverToken is a secure hash of the token used by the observer // component. HashedObserverToken string }
TokenAuthFilterConfig encapsulates several configuration options for the TokenAuthFilter.
type UsersEndpoints ¶
type UsersEndpoints struct { AuthFilter restmachinery.Filter Service api.UsersService }
func (*UsersEndpoints) Register ¶
func (u *UsersEndpoints) Register(router *mux.Router)
type WorkersEndpoints ¶
type WorkersEndpoints struct { AuthFilter restmachinery.Filter WorkerStatusSchemaLoader gojsonschema.JSONLoader Service api.WorkersService }
WorkersEndpoints implements restmachinery.Endpoints to provide Worker-related URL --> action mappings to a restmachinery.Server.
func (*WorkersEndpoints) Register ¶
func (w *WorkersEndpoints) Register(router *mux.Router)
Register is invoked by restmachinery.Server to register Worker-related URL --> action mappings to a restmachinery.Server.
Source Files ¶
- authn_endpoints.go
- events_endpoints.go
- jobs_endpoints.go
- logs_endpoints.go
- project_role_assignments_endpoints.go
- projects_endpoints.go
- role_assignments_endpoints.go
- secrets_endpoints.go
- service_account_endpoints.go
- sessions_endpoints.go
- substrate_endpoints.go
- system_endpoints.go
- token_auth_filter.go
- users_endpoints.go
- workers_endpoints.go