Documentation
¶
Overview ¶
Code generated by genservices. DO NOT EDIT.
Code generated by genservices. DO NOT EDIT.
Index ¶
- func RegisterHandlers(svc Service, r *mux.Router, regCtx *endpointutil.HandlerRegContext)
- type BasicService
- func (s BasicService) EventCreate(rc *request.AnonymousContext, context *EventRequestContext, body request.Body) error
- func (s BasicService) Get(rc *request.AuthorizedContext, reqOrg *request.Org) (*returntypes.SubInfo, error)
- func (s BasicService) Update(rc *request.AuthorizedContext, reqOrg *request.Org, payload *UpdatePayload) error
- type EventCreateRequest
- type EventCreateResponse
- type EventRequestContext
- type GetRequest
- type GetResponse
- type Service
- type UpdatePayload
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(svc Service, r *mux.Router, regCtx *endpointutil.HandlerRegContext)
Types ¶
type BasicService ¶
type BasicService struct {
// contains filtered or unexported fields
}
func NewBasicService ¶
func NewBasicService(orgPolicy *policy.Organization, cfg config.Config, update *subs.UpdaterProducer, pec *paymentevents.CreatorProducer) *BasicService
func (BasicService) EventCreate ¶
func (s BasicService) EventCreate(rc *request.AnonymousContext, context *EventRequestContext, body request.Body) error
func (BasicService) Get ¶
func (s BasicService) Get(rc *request.AuthorizedContext, reqOrg *request.Org) (*returntypes.SubInfo, error)
Find existing subscription for the organization and return it in "subscription" field (if subscription exists). If no subscription return trial duration: defend from always recreating subscription with the trial: select created_at of first created subscription and get trial duration as (config.getTrialDuration() - (now() - first_subscription.created_at).
func (BasicService) Update ¶
func (s BasicService) Update(rc *request.AuthorizedContext, reqOrg *request.Org, payload *UpdatePayload) error
type EventCreateRequest ¶
type EventCreateRequest struct {
Context *EventRequestContext
Body request.Body
}
type EventCreateResponse ¶
type EventCreateResponse struct {
// contains filtered or unexported fields
}
type EventRequestContext ¶
type EventRequestContext struct {
Provider string `request:"provider,urlPart,"`
Token string `request:"token,urlPart,"`
}
func (EventRequestContext) FillLogContext ¶
func (r EventRequestContext) FillLogContext(lctx logutil.Context)
type GetRequest ¶
type GetResponse ¶
type GetResponse struct {
*returntypes.SubInfo
// contains filtered or unexported fields
}
type Service ¶
type Service interface {
//url:/v1/orgs/{provider}/{name}/subscription
Get(rc *request.AuthorizedContext, reqOrg *request.Org) (*returntypes.SubInfo, error)
//url:/v1/orgs/{provider}/{name}/subscription method:PUT
Update(rc *request.AuthorizedContext, reqOrg *request.Org, payload *UpdatePayload) error
//url:/v1/payments/{provider}/{token}/events method:POST
EventCreate(rc *request.AnonymousContext, context *EventRequestContext, body request.Body) error
}
type UpdatePayload ¶
type UpdatePayload struct {
SeatsCount int `json:"seatsCount"`
OrgVersion int `json:"orgVersion"`
Version int `json:"version"`
}
func (UpdatePayload) FillLogContext ¶
func (p UpdatePayload) FillLogContext(lctx logutil.Context)
type UpdateRequest ¶
type UpdateRequest struct {
ReqOrg *request.Org
Payload *UpdatePayload
}
type UpdateResponse ¶
type UpdateResponse struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.