Documentation
¶
Index ¶
- func CustomerToAPI(c customer.Customer, subscriptions []subscription.Subscription, ...) (api.Customer, error)
- func FromAnnotations(annotations models.Annotations) *api.Annotations
- func FromMetadata(metadata models.Metadata) *api.Metadata
- func MapAccessToAPI(access entitlement.Access) (api.CustomerAccess, error)
- func MapAddress(apiAddress *api.Address) *models.Address
- func MapCustomerCreate(body api.CustomerCreate) customer.CustomerMutate
- func MapCustomerReplaceUpdate(body api.CustomerReplaceUpdate) customer.CustomerMutate
- type CreateCustomerHandler
- type CreateCustomerRequest
- type CreateCustomerResponse
- type CustomerAccessV2
- type CustomerHandler
- type DeleteCustomerHandler
- type DeleteCustomerRequest
- type DeleteCustomerResponse
- type EntitlementValueV2
- type GetCustomerAccessHandler
- type GetCustomerAccessParams
- type GetCustomerAccessRequest
- type GetCustomerAccessResponse
- type GetCustomerAccessV2Handler
- type GetCustomerAccessV2Response
- type GetCustomerEntitlementValueHandler
- type GetCustomerEntitlementValueParams
- type GetCustomerEntitlementValueRequest
- type GetCustomerEntitlementValueResponse
- type GetCustomerEntitlementValueV2Handler
- type GetCustomerEntitlementValueV2Response
- type GetCustomerHandler
- type GetCustomerParams
- type GetCustomerRequest
- type GetCustomerResponse
- type Handler
- type ListCustomersHandler
- type ListCustomersParams
- type ListCustomersRequest
- type ListCustomersResponse
- type UpdateCustomerHandler
- type UpdateCustomerRequest
- type UpdateCustomerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomerToAPI ¶
func CustomerToAPI(c customer.Customer, subscriptions []subscription.Subscription, expand customer.Expands) (api.Customer, error)
CustomerToAPI converts a Customer to an API Customer
func FromAnnotations ¶
func FromAnnotations(annotations models.Annotations) *api.Annotations
func MapAccessToAPI ¶
func MapAccessToAPI(access entitlement.Access) (api.CustomerAccess, error)
func MapCustomerCreate ¶
func MapCustomerCreate(body api.CustomerCreate) customer.CustomerMutate
func MapCustomerReplaceUpdate ¶
func MapCustomerReplaceUpdate(body api.CustomerReplaceUpdate) customer.CustomerMutate
Types ¶
type CreateCustomerHandler ¶
type CreateCustomerHandler httptransport.Handler[CreateCustomerRequest, CreateCustomerResponse]
type CreateCustomerRequest ¶
type CreateCustomerRequest = customer.CreateCustomerInput
type CreateCustomerResponse ¶
type CustomerAccessV2 ¶
type CustomerAccessV2 struct {
Entitlements map[string]EntitlementValueV2 `json:"entitlements"`
}
func MapAccessToAPIV2 ¶
func MapAccessToAPIV2(access entitlement.Access) (CustomerAccessV2, error)
type CustomerHandler ¶
type CustomerHandler interface {
ListCustomers() ListCustomersHandler
CreateCustomer() CreateCustomerHandler
DeleteCustomer() DeleteCustomerHandler
GetCustomer() GetCustomerHandler
UpdateCustomer() UpdateCustomerHandler
GetCustomerEntitlementValue() GetCustomerEntitlementValueHandler
GetCustomerEntitlementValueV2() GetCustomerEntitlementValueV2Handler
GetCustomerAccess() GetCustomerAccessHandler
GetCustomerAccessV2() GetCustomerAccessV2Handler
}
type DeleteCustomerHandler ¶
type DeleteCustomerHandler httptransport.HandlerWithArgs[DeleteCustomerRequest, DeleteCustomerResponse, string]
type DeleteCustomerRequest ¶
type DeleteCustomerResponse ¶
type DeleteCustomerResponse = interface{}
type EntitlementValueV2 ¶
type EntitlementValueV2 struct {
HasAccess bool `json:"hasAccess,omitempty"`
Balance *float64 `json:"balance,omitempty"`
Config *string `json:"config,omitempty"`
Overage *float64 `json:"overage,omitempty"`
TotalAvailableGrantAmount *float64 `json:"totalAvailableGrantAmount,omitempty"`
Usage *float64 `json:"usage,omitempty"`
GrantBalances *map[string]float64 `json:"grantBalances,omitempty"`
}
func MapEntitlementValueToAPIV2 ¶
func MapEntitlementValueToAPIV2(v entitlement.EntitlementValue) (EntitlementValueV2, error)
type GetCustomerAccessHandler ¶
type GetCustomerAccessHandler httptransport.HandlerWithArgs[GetCustomerAccessRequest, GetCustomerAccessResponse, GetCustomerAccessParams]
type GetCustomerAccessParams ¶
type GetCustomerAccessParams = struct {
CustomerIDOrKey string
}
type GetCustomerAccessRequest ¶
type GetCustomerAccessRequest = customer.GetCustomerInput
type GetCustomerAccessResponse ¶
type GetCustomerAccessResponse = api.CustomerAccess
type GetCustomerAccessV2Handler ¶
type GetCustomerAccessV2Handler httptransport.HandlerWithArgs[GetCustomerAccessRequest, GetCustomerAccessV2Response, GetCustomerAccessParams]
type GetCustomerAccessV2Response ¶
type GetCustomerAccessV2Response = CustomerAccessV2
type GetCustomerEntitlementValueHandler ¶
type GetCustomerEntitlementValueHandler httptransport.HandlerWithArgs[GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse, GetCustomerEntitlementValueParams]
type GetCustomerEntitlementValueRequest ¶
type GetCustomerEntitlementValueRequest struct {
customer.GetEntitlementValueInput
At time.Time
}
type GetCustomerEntitlementValueResponse ¶
type GetCustomerEntitlementValueResponse = api.EntitlementValue
type GetCustomerEntitlementValueV2Handler ¶
type GetCustomerEntitlementValueV2Handler httptransport.HandlerWithArgs[GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueV2Response, GetCustomerEntitlementValueParams]
type GetCustomerEntitlementValueV2Response ¶
type GetCustomerEntitlementValueV2Response = EntitlementValueV2
type GetCustomerHandler ¶
type GetCustomerHandler httptransport.HandlerWithArgs[GetCustomerRequest, GetCustomerResponse, GetCustomerParams]
type GetCustomerParams ¶
type GetCustomerParams struct {
CustomerIDOrKey string
api.GetCustomerParams
}
type GetCustomerRequest ¶
type GetCustomerRequest = customer.GetCustomerInput
type GetCustomerResponse ¶
type Handler ¶
type Handler interface {
CustomerHandler
}
func New ¶
func New( namespaceDecoder namespacedriver.NamespaceDecoder, service customer.Service, subscriptionService subscription.Service, entitlementService entitlement.Service, options ...httptransport.HandlerOption, ) Handler
type ListCustomersHandler ¶
type ListCustomersHandler httptransport.HandlerWithArgs[ListCustomersRequest, ListCustomersResponse, ListCustomersParams]
type ListCustomersParams ¶
type ListCustomersParams = api.ListCustomersParams
type ListCustomersRequest ¶
type ListCustomersRequest = customer.ListCustomersInput
type ListCustomersResponse ¶
type ListCustomersResponse = pagination.Result[api.Customer]
type UpdateCustomerHandler ¶
type UpdateCustomerHandler httptransport.HandlerWithArgs[UpdateCustomerRequest, UpdateCustomerResponse, string]
type UpdateCustomerRequest ¶
type UpdateCustomerRequest struct {
Namespace string
CustomerIDOrKey string
CustomerMutate customer.CustomerMutate
}
type UpdateCustomerResponse ¶
Click to show internal directories.
Click to hide internal directories.