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 // AdminAddOrganizationMemberHandler sets the operation handler for the add organization member operation AdminAddOrganizationMemberHandler admin.AddOrganizationMemberHandler // AccountChangePasswordHandler sets the operation handler for the change password operation AccountChangePasswordHandler account.ChangePasswordHandler // 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 // AdminCreateOrganizationHandler sets the operation handler for the create organization operation AdminCreateOrganizationHandler admin.CreateOrganizationHandler // AdminDeleteFrontendHandler sets the operation handler for the delete frontend operation AdminDeleteFrontendHandler admin.DeleteFrontendHandler // AdminDeleteOrganizationHandler sets the operation handler for the delete organization operation AdminDeleteOrganizationHandler admin.DeleteOrganizationHandler // EnvironmentDisableHandler sets the operation handler for the disable operation EnvironmentDisableHandler environment.DisableHandler // EnvironmentEnableHandler sets the operation handler for the enable operation EnvironmentEnableHandler environment.EnableHandler // 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 MetadataGetShareDetailHandler metadata.GetShareDetailHandler MetadataGetShareMetricsHandler metadata.GetShareMetricsHandler // AdminGrantsHandler sets the operation handler for the grants operation AdminGrantsHandler admin.GrantsHandler // 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 // AdminListFrontendsHandler sets the operation handler for the list frontends operation AdminListFrontendsHandler admin.ListFrontendsHandler // MetadataListMembershipsHandler sets the operation handler for the list memberships operation MetadataListMembershipsHandler metadata.ListMembershipsHandler // 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 // 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 // AccountRegenerateTokenHandler sets the operation handler for the regenerate token operation AccountRegenerateTokenHandler account.RegenerateTokenHandler // AccountRegisterHandler sets the operation handler for the register operation AccountRegisterHandler account.RegisterHandler // 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 ShareShareHandler share.ShareHandler ShareUnaccessHandler share.UnaccessHandler ShareUnshareHandler share.UnshareHandler // AdminUpdateFrontendHandler sets the operation handler for the update frontend operation AdminUpdateFrontendHandler admin.UpdateFrontendHandler ShareUpdateShareHandler share.UpdateShareHandler // AccountVerifyHandler sets the operation handler for the verify operation AccountVerifyHandler account.VerifyHandler // MetadataVersionHandler sets the operation handler for the version operation MetadataVersionHandler metadata.VersionHandler // 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, ...interface{}) // 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