Documentation
¶
Index ¶
- type ZrokAPI
- func (o *ZrokAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *ZrokAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *ZrokAPI) Authorizer() runtime.Authorizer
- func (o *ZrokAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *ZrokAPI) Context() *middleware.Context
- func (o *ZrokAPI) DefaultConsumes() string
- func (o *ZrokAPI) DefaultProduces() string
- func (o *ZrokAPI) Formats() strfmt.Registry
- func (o *ZrokAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *ZrokAPI) Init()
- func (o *ZrokAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *ZrokAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *ZrokAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *ZrokAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *ZrokAPI) Serve(builder middleware.Builder) http.Handler
- func (o *ZrokAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *ZrokAPI) SetDefaultConsumes(mediaType string)
- func (o *ZrokAPI) SetDefaultProduces(mediaType string)
- func (o *ZrokAPI) SetSpec(spec *loads.Document)
- func (o *ZrokAPI) UseRedoc()
- func (o *ZrokAPI) UseSwaggerUI()
- func (o *ZrokAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZrokAPI ¶
type ZrokAPI struct {
Middleware func(middleware.Builder) http.Handler
// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
// JSONConsumer registers a consumer for the following mime types:
// - application/zrok.v1+json
JSONConsumer runtime.Consumer
// JSONProducer registers a producer for the following mime types:
// - application/zrok.v1+json
JSONProducer runtime.Producer
// KeyAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key x-token provided in the header
KeyAuth func(string) (*rest_model_zrok.Principal, error)
// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
APIAuthorizer runtime.Authorizer
ShareAccessHandler share.AccessHandler
// AdminAddFrontendGrantHandler sets the operation handler for the add frontend grant operation
AdminAddFrontendGrantHandler admin.AddFrontendGrantHandler
// AdminAddNamespaceFrontendMappingHandler sets the operation handler for the add namespace frontend mapping operation
AdminAddNamespaceFrontendMappingHandler admin.AddNamespaceFrontendMappingHandler
// AdminAddNamespaceGrantHandler sets the operation handler for the add namespace grant operation
AdminAddNamespaceGrantHandler admin.AddNamespaceGrantHandler
// AdminAddOrganizationMemberHandler sets the operation handler for the add organization member operation
AdminAddOrganizationMemberHandler admin.AddOrganizationMemberHandler
// AdminApplyLimitClassesHandler sets the operation handler for the apply limit classes operation
AdminApplyLimitClassesHandler admin.ApplyLimitClassesHandler
// AccountChangePasswordHandler sets the operation handler for the change password operation
AccountChangePasswordHandler account.ChangePasswordHandler
// MetadataClientVersionCheckHandler sets the operation handler for the client version check operation
MetadataClientVersionCheckHandler metadata.ClientVersionCheckHandler
// MetadataConfigurationHandler sets the operation handler for the configuration operation
MetadataConfigurationHandler metadata.ConfigurationHandler
// AdminCreateAccountHandler sets the operation handler for the create account operation
AdminCreateAccountHandler admin.CreateAccountHandler
// AdminCreateFrontendHandler sets the operation handler for the create frontend operation
AdminCreateFrontendHandler admin.CreateFrontendHandler
// AdminCreateIdentityHandler sets the operation handler for the create identity operation
AdminCreateIdentityHandler admin.CreateIdentityHandler
// AdminCreateNamespaceHandler sets the operation handler for the create namespace operation
AdminCreateNamespaceHandler admin.CreateNamespaceHandler
// AdminCreateOrganizationHandler sets the operation handler for the create organization operation
AdminCreateOrganizationHandler admin.CreateOrganizationHandler
ShareCreateShareNameHandler share.CreateShareNameHandler
// AdminDeleteAccountHandler sets the operation handler for the delete account operation
AdminDeleteAccountHandler admin.DeleteAccountHandler
// AdminDeleteFrontendHandler sets the operation handler for the delete frontend operation
AdminDeleteFrontendHandler admin.DeleteFrontendHandler
// AdminDeleteFrontendGrantHandler sets the operation handler for the delete frontend grant operation
AdminDeleteFrontendGrantHandler admin.DeleteFrontendGrantHandler
// AdminDeleteIdentityHandler sets the operation handler for the delete identity operation
AdminDeleteIdentityHandler admin.DeleteIdentityHandler
// AdminDeleteNamespaceHandler sets the operation handler for the delete namespace operation
AdminDeleteNamespaceHandler admin.DeleteNamespaceHandler
// AdminDeleteOrganizationHandler sets the operation handler for the delete organization operation
AdminDeleteOrganizationHandler admin.DeleteOrganizationHandler
ShareDeleteShareNameHandler share.DeleteShareNameHandler
// EnvironmentDisableHandler sets the operation handler for the disable operation
EnvironmentDisableHandler environment.DisableHandler
// EnvironmentEnableHandler sets the operation handler for the enable operation
EnvironmentEnableHandler environment.EnableHandler
// AgentEnrollHandler sets the operation handler for the enroll operation
AgentEnrollHandler agent.EnrollHandler
// MetadataGetAccountDetailHandler sets the operation handler for the get account detail operation
MetadataGetAccountDetailHandler metadata.GetAccountDetailHandler
// MetadataGetAccountMetricsHandler sets the operation handler for the get account metrics operation
MetadataGetAccountMetricsHandler metadata.GetAccountMetricsHandler
// MetadataGetEnvironmentDetailHandler sets the operation handler for the get environment detail operation
MetadataGetEnvironmentDetailHandler metadata.GetEnvironmentDetailHandler
// MetadataGetEnvironmentMetricsHandler sets the operation handler for the get environment metrics operation
MetadataGetEnvironmentMetricsHandler metadata.GetEnvironmentMetricsHandler
// MetadataGetFrontendDetailHandler sets the operation handler for the get frontend detail operation
MetadataGetFrontendDetailHandler metadata.GetFrontendDetailHandler
// AdminGetNameHandler sets the operation handler for the get name operation
AdminGetNameHandler admin.GetNameHandler
MetadataGetShareDetailHandler metadata.GetShareDetailHandler
MetadataGetShareMetricsHandler metadata.GetShareMetricsHandler
// AdminGetSkipInterstitialGrantHandler sets the operation handler for the get skip interstitial grant operation
AdminGetSkipInterstitialGrantHandler admin.GetSkipInterstitialGrantHandler
// MetadataGetSparklinesHandler sets the operation handler for the get sparklines operation
MetadataGetSparklinesHandler metadata.GetSparklinesHandler
// AdminGrantSkipInterstitialHandler sets the operation handler for the grant skip interstitial operation
AdminGrantSkipInterstitialHandler admin.GrantSkipInterstitialHandler
// AccountInviteHandler sets the operation handler for the invite operation
AccountInviteHandler account.InviteHandler
// AdminInviteTokenGenerateHandler sets the operation handler for the invite token generate operation
AdminInviteTokenGenerateHandler admin.InviteTokenGenerateHandler
// MetadataListAccessesHandler sets the operation handler for the list accesses operation
MetadataListAccessesHandler metadata.ListAccessesHandler
ShareListAllNamesHandler share.ListAllNamesHandler
// AdminListAppliedLimitClassesHandler sets the operation handler for the list applied limit classes operation
AdminListAppliedLimitClassesHandler admin.ListAppliedLimitClassesHandler
// MetadataListEnvironmentsHandler sets the operation handler for the list environments operation
MetadataListEnvironmentsHandler metadata.ListEnvironmentsHandler
// AdminListFrontendNamespaceMappingsHandler sets the operation handler for the list frontend namespace mappings operation
AdminListFrontendNamespaceMappingsHandler admin.ListFrontendNamespaceMappingsHandler
// AdminListFrontendsHandler sets the operation handler for the list frontends operation
AdminListFrontendsHandler admin.ListFrontendsHandler
// AdminListLimitClassesHandler sets the operation handler for the list limit classes operation
AdminListLimitClassesHandler admin.ListLimitClassesHandler
// MetadataListMembershipsHandler sets the operation handler for the list memberships operation
MetadataListMembershipsHandler metadata.ListMembershipsHandler
ShareListNamesForNamespaceHandler share.ListNamesForNamespaceHandler
// AdminListNamespaceFrontendMappingsHandler sets the operation handler for the list namespace frontend mappings operation
AdminListNamespaceFrontendMappingsHandler admin.ListNamespaceFrontendMappingsHandler
// AdminListNamespacesHandler sets the operation handler for the list namespaces operation
AdminListNamespacesHandler admin.ListNamespacesHandler
// MetadataListOrgMembersHandler sets the operation handler for the list org members operation
MetadataListOrgMembersHandler metadata.ListOrgMembersHandler
// AdminListOrganizationMembersHandler sets the operation handler for the list organization members operation
AdminListOrganizationMembersHandler admin.ListOrganizationMembersHandler
// AdminListOrganizationsHandler sets the operation handler for the list organizations operation
AdminListOrganizationsHandler admin.ListOrganizationsHandler
ShareListShareNamespacesHandler share.ListShareNamespacesHandler
MetadataListSharesHandler metadata.ListSharesHandler
// AccountLoginHandler sets the operation handler for the login operation
AccountLoginHandler account.LoginHandler
// MetadataOrgAccountOverviewHandler sets the operation handler for the org account overview operation
MetadataOrgAccountOverviewHandler metadata.OrgAccountOverviewHandler
// MetadataOverviewHandler sets the operation handler for the overview operation
MetadataOverviewHandler metadata.OverviewHandler
// AgentPingHandler sets the operation handler for the ping operation
AgentPingHandler agent.PingHandler
// AccountRegenerateAccountTokenHandler sets the operation handler for the regenerate account token operation
AccountRegenerateAccountTokenHandler account.RegenerateAccountTokenHandler
// AccountRegisterHandler sets the operation handler for the register operation
AccountRegisterHandler account.RegisterHandler
// AgentRemoteAccessHandler sets the operation handler for the remote access operation
AgentRemoteAccessHandler agent.RemoteAccessHandler
AgentRemoteShareHandler agent.RemoteShareHandler
// AgentRemoteStatusHandler sets the operation handler for the remote status operation
AgentRemoteStatusHandler agent.RemoteStatusHandler
// AgentRemoteUnaccessHandler sets the operation handler for the remote unaccess operation
AgentRemoteUnaccessHandler agent.RemoteUnaccessHandler
AgentRemoteUnshareHandler agent.RemoteUnshareHandler
// AdminRemoveAppliedLimitClassesHandler sets the operation handler for the remove applied limit classes operation
AdminRemoveAppliedLimitClassesHandler admin.RemoveAppliedLimitClassesHandler
// AdminRemoveNamespaceFrontendMappingHandler sets the operation handler for the remove namespace frontend mapping operation
AdminRemoveNamespaceFrontendMappingHandler admin.RemoveNamespaceFrontendMappingHandler
// AdminRemoveNamespaceGrantHandler sets the operation handler for the remove namespace grant operation
AdminRemoveNamespaceGrantHandler admin.RemoveNamespaceGrantHandler
// AdminRemoveOrganizationMemberHandler sets the operation handler for the remove organization member operation
AdminRemoveOrganizationMemberHandler admin.RemoveOrganizationMemberHandler
// AccountResetPasswordHandler sets the operation handler for the reset password operation
AccountResetPasswordHandler account.ResetPasswordHandler
// AccountResetPasswordRequestHandler sets the operation handler for the reset password request operation
AccountResetPasswordRequestHandler account.ResetPasswordRequestHandler
// AdminRevokeSkipInterstitialHandler sets the operation handler for the revoke skip interstitial operation
AdminRevokeSkipInterstitialHandler admin.RevokeSkipInterstitialHandler
ShareShareHandler share.ShareHandler
AgentShareHTTPHealthcheckHandler agent.ShareHTTPHealthcheckHandler
ShareUnaccessHandler share.UnaccessHandler
// AgentUnenrollHandler sets the operation handler for the unenroll operation
AgentUnenrollHandler agent.UnenrollHandler
ShareUnshareHandler share.UnshareHandler
ShareUpdateAccessHandler share.UpdateAccessHandler
// AdminUpdateAccountPasswordHandler sets the operation handler for the update account password operation
AdminUpdateAccountPasswordHandler admin.UpdateAccountPasswordHandler
// AdminUpdateFrontendHandler sets the operation handler for the update frontend operation
AdminUpdateFrontendHandler admin.UpdateFrontendHandler
// AdminUpdateNamespaceHandler sets the operation handler for the update namespace operation
AdminUpdateNamespaceHandler admin.UpdateNamespaceHandler
ShareUpdateShareHandler share.UpdateShareHandler
ShareUpdateShareNameHandler share.UpdateShareNameHandler
// AccountVerifyHandler sets the operation handler for the verify operation
AccountVerifyHandler account.VerifyHandler
// MetadataVersionHandler sets the operation handler for the version operation
MetadataVersionHandler metadata.VersionHandler
// MetadataVersionInventoryHandler sets the operation handler for the version inventory operation
MetadataVersionInventoryHandler metadata.VersionInventoryHandler
// ServeError is called when an error is received, there is a default handler
// but you can set your own with this
ServeError func(http.ResponseWriter, *http.Request, error)
// PreServerShutdown is called before the HTTP(S) server is shutdown
// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
PreServerShutdown func()
// ServerShutdown is called when the HTTP(S) server is shut down and done
// handling all active connections and does not accept connections any more
ServerShutdown func()
// Custom command line argument groups with their descriptions
CommandLineOptionsGroups []swag.CommandLineOptionsGroup
// User defined logger function.
Logger func(string, ...any)
// contains filtered or unexported fields
}
ZrokAPI zrok client access
func NewZrokAPI ¶
NewZrokAPI creates a new Zrok instance
func (*ZrokAPI) AddMiddlewareFor ¶
func (o *ZrokAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*ZrokAPI) AuthenticatorsFor ¶
func (o *ZrokAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*ZrokAPI) Authorizer ¶
func (o *ZrokAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*ZrokAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types.
MIME type parameters are ignored here.
func (*ZrokAPI) Context ¶
func (o *ZrokAPI) Context() *middleware.Context
Context returns the middleware context for the zrok API
func (*ZrokAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*ZrokAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*ZrokAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*ZrokAPI) Init ¶
func (o *ZrokAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*ZrokAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types.
MIME type parameters are ignored here.
func (*ZrokAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*ZrokAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*ZrokAPI) RegisterProducer ¶
RegisterProducer allows you to add (or override) a producer for a media type.
func (*ZrokAPI) Serve ¶
func (o *ZrokAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*ZrokAPI) ServeErrorFor ¶
ServeErrorFor gets a error handler for a given operation id
func (*ZrokAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*ZrokAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
func (*ZrokAPI) UseSwaggerUI ¶
func (o *ZrokAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs