Documentation
¶
Overview ¶
Package restapi Plan Manager Management API
An API which supports creation, deletion, listing etc of Plan Manager Schemes: http https Host: localhost:8000 BasePath: /api/v1.0 Version: 1.0.0 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Contact: <sean@cyclops-labs.io> Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- Constants
- Variables
- func Handler(c Config) (http.Handler, error)
- func HandlerAPI(c Config) (http.Handler, *operations.PlanManagerManagementAPIAPI, error)
- type BundleManagementAPI
- type Config
- type CycleManagementAPI
- type PlanManagementAPI
- type PriceManagementAPI
- type SkuManagementAPI
- type StatusManagementAPI
- type TriggerManagementAPI
Constants ¶
View Source
const AuthKey contextKey = "Auth"
Variables ¶
View Source
var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage )
Functions ¶
func Handler ¶
Handler returns an http.Handler given the handler configuration It mounts all the business logic implementers in the right routing.
func HandlerAPI ¶
func HandlerAPI(c Config) (http.Handler, *operations.PlanManagerManagementAPIAPI, error)
HandlerAPI returns an http.Handler given the handler configuration and the corresponding *PlanManagerManagementAPI instance. It mounts all the business logic implementers in the right routing.
Types ¶
type BundleManagementAPI ¶
type BundleManagementAPI interface {
/* CreateSkuBundle create SKU bundle */
CreateSkuBundle(ctx context.Context, params bundle_management.CreateSkuBundleParams) middleware.Responder
/* GetSkuBundle Get specific sku bundle */
GetSkuBundle(ctx context.Context, params bundle_management.GetSkuBundleParams) middleware.Responder
/* GetSkuBundleByName Get specific sku bundle */
GetSkuBundleByName(ctx context.Context, params bundle_management.GetSkuBundleByNameParams) middleware.Responder
/* ListSkuBundles list SKU Bundles */
ListSkuBundles(ctx context.Context, params bundle_management.ListSkuBundlesParams) middleware.Responder
/* UpdateSkuBundle Update specific sku bundle */
UpdateSkuBundle(ctx context.Context, params bundle_management.UpdateSkuBundleParams) middleware.Responder
}
BundleManagementAPI
type Config ¶
type Config struct {
BundleManagementAPI
CycleManagementAPI
PlanManagementAPI
PriceManagementAPI
SkuManagementAPI
StatusManagementAPI
TriggerManagementAPI
Logger func(string, ...interface{})
// InnerMiddleware is for the handler executors. These do not apply to the swagger.json document.
// The middleware executes after routing but before authentication, binding and validation
InnerMiddleware func(http.Handler) http.Handler
// Authorizer is used to authorize a request after the Auth function was called using the "Auth*" functions
// and the principal was stored in the context in the "AuthKey" context value.
Authorizer func(*http.Request) error
// AuthAPIKeyHeader Applies when the "X-API-KEY" header is set
AuthAPIKeyHeader func(token string) (interface{}, error)
// AuthAPIKeyParam Applies when the "api_key" query is set
AuthAPIKeyParam func(token string) (interface{}, error)
// AuthKeycloak For OAuth2 authentication
AuthKeycloak func(token string, scopes []string) (interface{}, error)
// Authenticator to use for all APIKey authentication
APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
// Authenticator to use for all Bearer authentication
BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
// Authenticator to use for all Basic authentication
BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
}
Config is configuration for Handler
type CycleManagementAPI ¶
type CycleManagementAPI interface {
/* CreateCycle Create a plan */
CreateCycle(ctx context.Context, params cycle_management.CreateCycleParams) middleware.Responder
/* GetCycle Get specific cycle */
GetCycle(ctx context.Context, params cycle_management.GetCycleParams) middleware.Responder
/* ListCycles List all cycles */
ListCycles(ctx context.Context, params cycle_management.ListCyclesParams) middleware.Responder
/* UpdateCycle Update specific cycle */
UpdateCycle(ctx context.Context, params cycle_management.UpdateCycleParams) middleware.Responder
}
CycleManagementAPI
type PlanManagementAPI ¶
type PlanManagementAPI interface {
/* CreatePlan Create a plan */
CreatePlan(ctx context.Context, params plan_management.CreatePlanParams) middleware.Responder
/* GetCompletePlan Get complete plan */
GetCompletePlan(ctx context.Context, params plan_management.GetCompletePlanParams) middleware.Responder
/* GetPlan Get specific plan */
GetPlan(ctx context.Context, params plan_management.GetPlanParams) middleware.Responder
/* ListCompletePlans Get full information relating to known plans */
ListCompletePlans(ctx context.Context, params plan_management.ListCompletePlansParams) middleware.Responder
/* ListPlans List all plans */
ListPlans(ctx context.Context, params plan_management.ListPlansParams) middleware.Responder
/* UpdatePlan Update specific plan */
UpdatePlan(ctx context.Context, params plan_management.UpdatePlanParams) middleware.Responder
}
PlanManagementAPI
type PriceManagementAPI ¶
type PriceManagementAPI interface {
/* CreateSkuPrice create SKU price */
CreateSkuPrice(ctx context.Context, params price_management.CreateSkuPriceParams) middleware.Responder
/* GetSkuPrice Get specific sku price */
GetSkuPrice(ctx context.Context, params price_management.GetSkuPriceParams) middleware.Responder
/* ListSkuPrices list SKU Prices */
ListSkuPrices(ctx context.Context, params price_management.ListSkuPricesParams) middleware.Responder
/* UpdateSkuPrice Update specific sku price */
UpdateSkuPrice(ctx context.Context, params price_management.UpdateSkuPriceParams) middleware.Responder
}
PriceManagementAPI
type SkuManagementAPI ¶
type SkuManagementAPI interface {
/* CreateSku create SKU */
CreateSku(ctx context.Context, params sku_management.CreateSkuParams) middleware.Responder
/* GetSku Get specific sku */
GetSku(ctx context.Context, params sku_management.GetSkuParams) middleware.Responder
/* ListSkus list SKUs */
ListSkus(ctx context.Context, params sku_management.ListSkusParams) middleware.Responder
/* UpdateSku Update specific sku */
UpdateSku(ctx context.Context, params sku_management.UpdateSkuParams) middleware.Responder
}
SkuManagementAPI
type StatusManagementAPI ¶
type StatusManagementAPI interface {
/* GetStatus Basic status of the system */
GetStatus(ctx context.Context, params status_management.GetStatusParams) middleware.Responder
/* ShowStatus Basic status of the system */
ShowStatus(ctx context.Context, params status_management.ShowStatusParams) middleware.Responder
}
StatusManagementAPI
type TriggerManagementAPI ¶
type TriggerManagementAPI interface {
/* ExecSample Sample task trigger */
ExecSample(ctx context.Context, params trigger_management.ExecSampleParams) middleware.Responder
}
TriggerManagementAPI
Source Files
¶
Click to show internal directories.
Click to hide internal directories.