Documentation
¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type ActiveStatus
- func (s *ActiveStatus) Decode(d *jx.Decoder) error
- func (s *ActiveStatus) Encode(e *jx.Encoder)
- func (s *ActiveStatus) GetLastActive() time.Time
- func (s *ActiveStatus) GetStatus() ActiveStatusStatus
- func (s *ActiveStatus) MarshalJSON() ([]byte, error)
- func (s *ActiveStatus) SetLastActive(val time.Time)
- func (s *ActiveStatus) SetStatus(val ActiveStatusStatus)
- func (s *ActiveStatus) UnmarshalJSON(data []byte) error
- func (s *ActiveStatus) Validate() error
- type ActiveStatusStatus
- func (ActiveStatusStatus) AllValues() []ActiveStatusStatus
- func (s *ActiveStatusStatus) Decode(d *jx.Decoder) error
- func (s ActiveStatusStatus) Encode(e *jx.Encoder)
- func (s ActiveStatusStatus) MarshalJSON() ([]byte, error)
- func (s ActiveStatusStatus) MarshalText() ([]byte, error)
- func (s *ActiveStatusStatus) UnmarshalJSON(data []byte) error
- func (s *ActiveStatusStatus) UnmarshalText(data []byte) error
- func (s ActiveStatusStatus) Validate() error
- type AdminResource
- func (s *AdminResource) Decode(d *jx.Decoder) error
- func (s *AdminResource) Encode(e *jx.Encoder)
- func (s *AdminResource) GetAdminId() string
- func (s *AdminResource) GetRole() AdminResourceRole
- func (s *AdminResource) GetType() AdminResourceType
- func (s *AdminResource) MarshalJSON() ([]byte, error)
- func (s *AdminResource) SetAdminId(val string)
- func (s *AdminResource) SetRole(val AdminResourceRole)
- func (s *AdminResource) SetType(val AdminResourceType)
- func (s *AdminResource) UnmarshalJSON(data []byte) error
- func (s *AdminResource) Validate() error
- type AdminResourceRole
- func (AdminResourceRole) AllValues() []AdminResourceRole
- func (s *AdminResourceRole) Decode(d *jx.Decoder) error
- func (s AdminResourceRole) Encode(e *jx.Encoder)
- func (s AdminResourceRole) MarshalJSON() ([]byte, error)
- func (s AdminResourceRole) MarshalText() ([]byte, error)
- func (s *AdminResourceRole) UnmarshalJSON(data []byte) error
- func (s *AdminResourceRole) UnmarshalText(data []byte) error
- func (s AdminResourceRole) Validate() error
- type AdminResourceType
- func (AdminResourceType) AllValues() []AdminResourceType
- func (s *AdminResourceType) Decode(d *jx.Decoder) error
- func (s AdminResourceType) Encode(e *jx.Encoder)
- func (s AdminResourceType) MarshalJSON() ([]byte, error)
- func (s AdminResourceType) MarshalText() ([]byte, error)
- func (s *AdminResourceType) UnmarshalJSON(data []byte) error
- func (s *AdminResourceType) UnmarshalText(data []byte) error
- func (s AdminResourceType) Validate() error
- type Client
- type ClientOption
- type ErrorHandler
- type Event
- func (s *Event) Decode(d *jx.Decoder) error
- func (s Event) Encode(e *jx.Encoder)
- func (s Event) GetMetricEvent() (v MetricEvent, ok bool)
- func (s Event) GetSystemEvent() (v SystemEvent, ok bool)
- func (s Event) GetUserEvent() (v UserEvent, ok bool)
- func (s Event) IsMetricEvent() bool
- func (s Event) IsSystemEvent() bool
- func (s Event) IsUserEvent() bool
- func (s Event) MarshalJSON() ([]byte, error)
- func (s *Event) SetMetricEvent(v MetricEvent)
- func (s *Event) SetSystemEvent(v SystemEvent)
- func (s *Event) SetUserEvent(v UserEvent)
- func (s *Event) UnmarshalJSON(data []byte) error
- func (s Event) Validate() error
- type EventType
- type FedExShippingOption
- func (s *FedExShippingOption) Decode(d *jx.Decoder) error
- func (s *FedExShippingOption) Encode(e *jx.Encoder)
- func (s *FedExShippingOption) GetCarrier() FedExShippingOptionCarrier
- func (s *FedExShippingOption) GetSignature() FedExShippingOptionSignature
- func (s *FedExShippingOption) MarshalJSON() ([]byte, error)
- func (s *FedExShippingOption) SetCarrier(val FedExShippingOptionCarrier)
- func (s *FedExShippingOption) SetSignature(val FedExShippingOptionSignature)
- func (s *FedExShippingOption) UnmarshalJSON(data []byte) error
- func (s *FedExShippingOption) Validate() error
- type FedExShippingOptionCarrier
- func (FedExShippingOptionCarrier) AllValues() []FedExShippingOptionCarrier
- func (s *FedExShippingOptionCarrier) Decode(d *jx.Decoder) error
- func (s FedExShippingOptionCarrier) Encode(e *jx.Encoder)
- func (s FedExShippingOptionCarrier) MarshalJSON() ([]byte, error)
- func (s FedExShippingOptionCarrier) MarshalText() ([]byte, error)
- func (s *FedExShippingOptionCarrier) UnmarshalJSON(data []byte) error
- func (s *FedExShippingOptionCarrier) UnmarshalText(data []byte) error
- func (s FedExShippingOptionCarrier) Validate() error
- type FedExShippingOptionSignature
- func (FedExShippingOptionSignature) AllValues() []FedExShippingOptionSignature
- func (s *FedExShippingOptionSignature) Decode(d *jx.Decoder) error
- func (s FedExShippingOptionSignature) Encode(e *jx.Encoder)
- func (s FedExShippingOptionSignature) MarshalJSON() ([]byte, error)
- func (s FedExShippingOptionSignature) MarshalText() ([]byte, error)
- func (s *FedExShippingOptionSignature) UnmarshalJSON(data []byte) error
- func (s *FedExShippingOptionSignature) UnmarshalText(data []byte) error
- func (s FedExShippingOptionSignature) Validate() error
- type Handler
- type InactiveStatus
- func (s *InactiveStatus) Decode(d *jx.Decoder) error
- func (s *InactiveStatus) Encode(e *jx.Encoder)
- func (s *InactiveStatus) GetDeletedAt() time.Time
- func (s *InactiveStatus) GetStatus() InactiveStatusStatus
- func (s *InactiveStatus) MarshalJSON() ([]byte, error)
- func (s *InactiveStatus) SetDeletedAt(val time.Time)
- func (s *InactiveStatus) SetStatus(val InactiveStatusStatus)
- func (s *InactiveStatus) UnmarshalJSON(data []byte) error
- func (s *InactiveStatus) Validate() error
- type InactiveStatusStatus
- func (InactiveStatusStatus) AllValues() []InactiveStatusStatus
- func (s *InactiveStatusStatus) Decode(d *jx.Decoder) error
- func (s InactiveStatusStatus) Encode(e *jx.Encoder)
- func (s InactiveStatusStatus) MarshalJSON() ([]byte, error)
- func (s InactiveStatusStatus) MarshalText() ([]byte, error)
- func (s *InactiveStatusStatus) UnmarshalJSON(data []byte) error
- func (s *InactiveStatusStatus) UnmarshalText(data []byte) error
- func (s InactiveStatusStatus) Validate() error
- type Invoker
- type Labeler
- type LogEventOK
- type MetricEvent
- func (s *MetricEvent) Decode(d *jx.Decoder) error
- func (s *MetricEvent) Encode(e *jx.Encoder)
- func (s *MetricEvent) GetEventType() MetricEventEventType
- func (s *MetricEvent) GetMetricId() string
- func (s *MetricEvent) GetPriority() float64
- func (s *MetricEvent) MarshalJSON() ([]byte, error)
- func (s *MetricEvent) SetEventType(val MetricEventEventType)
- func (s *MetricEvent) SetMetricId(val string)
- func (s *MetricEvent) SetPriority(val float64)
- func (s *MetricEvent) UnmarshalJSON(data []byte) error
- func (s *MetricEvent) Validate() error
- type MetricEventEventType
- func (MetricEventEventType) AllValues() []MetricEventEventType
- func (s *MetricEventEventType) Decode(d *jx.Decoder) error
- func (s MetricEventEventType) Encode(e *jx.Encoder)
- func (s MetricEventEventType) MarshalJSON() ([]byte, error)
- func (s MetricEventEventType) MarshalText() ([]byte, error)
- func (s *MetricEventEventType) UnmarshalJSON(data []byte) error
- func (s *MetricEventEventType) UnmarshalText(data []byte) error
- func (s MetricEventEventType) Validate() error
- type Middleware
- type OperationName
- type Option
- type Resource
- func (s *Resource) Decode(d *jx.Decoder) error
- func (s Resource) Encode(e *jx.Encoder)
- func (s Resource) GetAdminResource() (v AdminResource, ok bool)
- func (s Resource) GetUserResource() (v UserResource, ok bool)
- func (s Resource) IsAdminResource() bool
- func (s Resource) IsUserResource() bool
- func (s Resource) MarshalJSON() ([]byte, error)
- func (s *Resource) SetAdminResource(v AdminResource)
- func (s *Resource) SetUserResource(v UserResource)
- func (s *Resource) UnmarshalJSON(data []byte) error
- func (s Resource) Validate() error
- type ResourceType
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type ShippingOption
- func (s *ShippingOption) Decode(d *jx.Decoder) error
- func (s ShippingOption) Encode(e *jx.Encoder)
- func (s ShippingOption) GetFedExShippingOption() (v FedExShippingOption, ok bool)
- func (s ShippingOption) GetUSPSShippingOption() (v USPSShippingOption, ok bool)
- func (s ShippingOption) IsFedExShippingOption() bool
- func (s ShippingOption) IsUSPSShippingOption() bool
- func (s ShippingOption) MarshalJSON() ([]byte, error)
- func (s *ShippingOption) SetFedExShippingOption(v FedExShippingOption)
- func (s *ShippingOption) SetUSPSShippingOption(v USPSShippingOption)
- func (s *ShippingOption) UnmarshalJSON(data []byte) error
- func (s ShippingOption) Validate() error
- type ShippingOptionType
- type StatusResponse
- func (s *StatusResponse) Decode(d *jx.Decoder) error
- func (s StatusResponse) Encode(e *jx.Encoder)
- func (s StatusResponse) GetActiveStatus() (v ActiveStatus, ok bool)
- func (s StatusResponse) GetInactiveStatus() (v InactiveStatus, ok bool)
- func (s StatusResponse) IsActiveStatus() bool
- func (s StatusResponse) IsInactiveStatus() bool
- func (s StatusResponse) MarshalJSON() ([]byte, error)
- func (s *StatusResponse) SetActiveStatus(v ActiveStatus)
- func (s *StatusResponse) SetInactiveStatus(v InactiveStatus)
- func (s *StatusResponse) UnmarshalJSON(data []byte) error
- func (s StatusResponse) Validate() error
- type StatusResponseType
- type SystemEvent
- func (s *SystemEvent) Decode(d *jx.Decoder) error
- func (s *SystemEvent) Encode(e *jx.Encoder)
- func (s *SystemEvent) GetEventType() SystemEventEventType
- func (s *SystemEvent) GetPriority() int
- func (s *SystemEvent) GetSystemId() string
- func (s *SystemEvent) MarshalJSON() ([]byte, error)
- func (s *SystemEvent) SetEventType(val SystemEventEventType)
- func (s *SystemEvent) SetPriority(val int)
- func (s *SystemEvent) SetSystemId(val string)
- func (s *SystemEvent) UnmarshalJSON(data []byte) error
- func (s *SystemEvent) Validate() error
- type SystemEventEventType
- func (SystemEventEventType) AllValues() []SystemEventEventType
- func (s *SystemEventEventType) Decode(d *jx.Decoder) error
- func (s SystemEventEventType) Encode(e *jx.Encoder)
- func (s SystemEventEventType) MarshalJSON() ([]byte, error)
- func (s SystemEventEventType) MarshalText() ([]byte, error)
- func (s *SystemEventEventType) UnmarshalJSON(data []byte) error
- func (s *SystemEventEventType) UnmarshalText(data []byte) error
- func (s SystemEventEventType) Validate() error
- type USPSShippingOption
- func (s *USPSShippingOption) Decode(d *jx.Decoder) error
- func (s *USPSShippingOption) Encode(e *jx.Encoder)
- func (s *USPSShippingOption) GetCarrier() USPSShippingOptionCarrier
- func (s *USPSShippingOption) GetSignature() USPSShippingOptionSignature
- func (s *USPSShippingOption) MarshalJSON() ([]byte, error)
- func (s *USPSShippingOption) SetCarrier(val USPSShippingOptionCarrier)
- func (s *USPSShippingOption) SetSignature(val USPSShippingOptionSignature)
- func (s *USPSShippingOption) UnmarshalJSON(data []byte) error
- func (s *USPSShippingOption) Validate() error
- type USPSShippingOptionCarrier
- func (USPSShippingOptionCarrier) AllValues() []USPSShippingOptionCarrier
- func (s *USPSShippingOptionCarrier) Decode(d *jx.Decoder) error
- func (s USPSShippingOptionCarrier) Encode(e *jx.Encoder)
- func (s USPSShippingOptionCarrier) MarshalJSON() ([]byte, error)
- func (s USPSShippingOptionCarrier) MarshalText() ([]byte, error)
- func (s *USPSShippingOptionCarrier) UnmarshalJSON(data []byte) error
- func (s *USPSShippingOptionCarrier) UnmarshalText(data []byte) error
- func (s USPSShippingOptionCarrier) Validate() error
- type USPSShippingOptionSignature
- func (USPSShippingOptionSignature) AllValues() []USPSShippingOptionSignature
- func (s *USPSShippingOptionSignature) Decode(d *jx.Decoder) error
- func (s USPSShippingOptionSignature) Encode(e *jx.Encoder)
- func (s USPSShippingOptionSignature) MarshalJSON() ([]byte, error)
- func (s USPSShippingOptionSignature) MarshalText() ([]byte, error)
- func (s *USPSShippingOptionSignature) UnmarshalJSON(data []byte) error
- func (s *USPSShippingOptionSignature) UnmarshalText(data []byte) error
- func (s USPSShippingOptionSignature) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) GetResource(ctx context.Context) (r Resource, _ error)
- func (UnimplementedHandler) GetShippingOption(ctx context.Context) (r ShippingOption, _ error)
- func (UnimplementedHandler) GetStatus(ctx context.Context) (r StatusResponse, _ error)
- func (UnimplementedHandler) LogEvent(ctx context.Context, req Event) error
- type UserEvent
- func (s *UserEvent) Decode(d *jx.Decoder) error
- func (s *UserEvent) Encode(e *jx.Encoder)
- func (s *UserEvent) GetEventType() UserEventEventType
- func (s *UserEvent) GetPriority() string
- func (s *UserEvent) GetUserId() string
- func (s *UserEvent) MarshalJSON() ([]byte, error)
- func (s *UserEvent) SetEventType(val UserEventEventType)
- func (s *UserEvent) SetPriority(val string)
- func (s *UserEvent) SetUserId(val string)
- func (s *UserEvent) UnmarshalJSON(data []byte) error
- func (s *UserEvent) Validate() error
- type UserEventEventType
- func (UserEventEventType) AllValues() []UserEventEventType
- func (s *UserEventEventType) Decode(d *jx.Decoder) error
- func (s UserEventEventType) Encode(e *jx.Encoder)
- func (s UserEventEventType) MarshalJSON() ([]byte, error)
- func (s UserEventEventType) MarshalText() ([]byte, error)
- func (s *UserEventEventType) UnmarshalJSON(data []byte) error
- func (s *UserEventEventType) UnmarshalText(data []byte) error
- func (s UserEventEventType) Validate() error
- type UserResource
- func (s *UserResource) Decode(d *jx.Decoder) error
- func (s *UserResource) Encode(e *jx.Encoder)
- func (s *UserResource) GetRole() UserResourceRole
- func (s *UserResource) GetType() UserResourceType
- func (s *UserResource) GetUserId() string
- func (s *UserResource) MarshalJSON() ([]byte, error)
- func (s *UserResource) SetRole(val UserResourceRole)
- func (s *UserResource) SetType(val UserResourceType)
- func (s *UserResource) SetUserId(val string)
- func (s *UserResource) UnmarshalJSON(data []byte) error
- func (s *UserResource) Validate() error
- type UserResourceRole
- func (UserResourceRole) AllValues() []UserResourceRole
- func (s *UserResourceRole) Decode(d *jx.Decoder) error
- func (s UserResourceRole) Encode(e *jx.Encoder)
- func (s UserResourceRole) MarshalJSON() ([]byte, error)
- func (s UserResourceRole) MarshalText() ([]byte, error)
- func (s *UserResourceRole) UnmarshalJSON(data []byte) error
- func (s *UserResourceRole) UnmarshalText(data []byte) error
- func (s UserResourceRole) Validate() error
- type UserResourceType
- func (UserResourceType) AllValues() []UserResourceType
- func (s *UserResourceType) Decode(d *jx.Decoder) error
- func (s UserResourceType) Encode(e *jx.Encoder)
- func (s UserResourceType) MarshalJSON() ([]byte, error)
- func (s UserResourceType) MarshalText() ([]byte, error)
- func (s *UserResourceType) UnmarshalJSON(data []byte) error
- func (s *UserResourceType) UnmarshalText(data []byte) error
- func (s UserResourceType) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActiveStatus ¶
type ActiveStatus struct {
// Active states.
Status ActiveStatusStatus `json:"status"`
LastActive time.Time `json:"lastActive"`
}
Ref: #/components/schemas/ActiveStatus
func (*ActiveStatus) Decode ¶
func (s *ActiveStatus) Decode(d *jx.Decoder) error
Decode decodes ActiveStatus from json.
func (*ActiveStatus) Encode ¶
func (s *ActiveStatus) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ActiveStatus) GetLastActive ¶
func (s *ActiveStatus) GetLastActive() time.Time
GetLastActive returns the value of LastActive.
func (*ActiveStatus) GetStatus ¶
func (s *ActiveStatus) GetStatus() ActiveStatusStatus
GetStatus returns the value of Status.
func (*ActiveStatus) MarshalJSON ¶
func (s *ActiveStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ActiveStatus) SetLastActive ¶
func (s *ActiveStatus) SetLastActive(val time.Time)
SetLastActive sets the value of LastActive.
func (*ActiveStatus) SetStatus ¶
func (s *ActiveStatus) SetStatus(val ActiveStatusStatus)
SetStatus sets the value of Status.
func (*ActiveStatus) UnmarshalJSON ¶
func (s *ActiveStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ActiveStatus) Validate ¶
func (s *ActiveStatus) Validate() error
type ActiveStatusStatus ¶
type ActiveStatusStatus string
Active states.
const ( ActiveStatusStatusActive ActiveStatusStatus = "active" ActiveStatusStatusPending ActiveStatusStatus = "pending" )
func (ActiveStatusStatus) AllValues ¶
func (ActiveStatusStatus) AllValues() []ActiveStatusStatus
AllValues returns all ActiveStatusStatus values.
func (*ActiveStatusStatus) Decode ¶
func (s *ActiveStatusStatus) Decode(d *jx.Decoder) error
Decode decodes ActiveStatusStatus from json.
func (ActiveStatusStatus) Encode ¶
func (s ActiveStatusStatus) Encode(e *jx.Encoder)
Encode encodes ActiveStatusStatus as json.
func (ActiveStatusStatus) MarshalJSON ¶
func (s ActiveStatusStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ActiveStatusStatus) MarshalText ¶
func (s ActiveStatusStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ActiveStatusStatus) UnmarshalJSON ¶
func (s *ActiveStatusStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ActiveStatusStatus) UnmarshalText ¶
func (s *ActiveStatusStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ActiveStatusStatus) Validate ¶
func (s ActiveStatusStatus) Validate() error
type AdminResource ¶
type AdminResource struct {
// Resource type.
Type AdminResourceType `json:"type"`
// Admin roles.
Role AdminResourceRole `json:"role"`
AdminId string `json:"adminId"`
}
Ref: #/components/schemas/AdminResource
func (*AdminResource) Decode ¶
func (s *AdminResource) Decode(d *jx.Decoder) error
Decode decodes AdminResource from json.
func (*AdminResource) Encode ¶
func (s *AdminResource) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AdminResource) GetAdminId ¶
func (s *AdminResource) GetAdminId() string
GetAdminId returns the value of AdminId.
func (*AdminResource) GetRole ¶
func (s *AdminResource) GetRole() AdminResourceRole
GetRole returns the value of Role.
func (*AdminResource) GetType ¶
func (s *AdminResource) GetType() AdminResourceType
GetType returns the value of Type.
func (*AdminResource) MarshalJSON ¶
func (s *AdminResource) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AdminResource) SetAdminId ¶
func (s *AdminResource) SetAdminId(val string)
SetAdminId sets the value of AdminId.
func (*AdminResource) SetRole ¶
func (s *AdminResource) SetRole(val AdminResourceRole)
SetRole sets the value of Role.
func (*AdminResource) SetType ¶
func (s *AdminResource) SetType(val AdminResourceType)
SetType sets the value of Type.
func (*AdminResource) UnmarshalJSON ¶
func (s *AdminResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AdminResource) Validate ¶
func (s *AdminResource) Validate() error
type AdminResourceRole ¶
type AdminResourceRole string
Admin roles.
const ( AdminResourceRoleSuperadmin AdminResourceRole = "superadmin" AdminResourceRoleModerator AdminResourceRole = "moderator" )
func (AdminResourceRole) AllValues ¶
func (AdminResourceRole) AllValues() []AdminResourceRole
AllValues returns all AdminResourceRole values.
func (*AdminResourceRole) Decode ¶
func (s *AdminResourceRole) Decode(d *jx.Decoder) error
Decode decodes AdminResourceRole from json.
func (AdminResourceRole) Encode ¶
func (s AdminResourceRole) Encode(e *jx.Encoder)
Encode encodes AdminResourceRole as json.
func (AdminResourceRole) MarshalJSON ¶
func (s AdminResourceRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (AdminResourceRole) MarshalText ¶
func (s AdminResourceRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*AdminResourceRole) UnmarshalJSON ¶
func (s *AdminResourceRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AdminResourceRole) UnmarshalText ¶
func (s *AdminResourceRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (AdminResourceRole) Validate ¶
func (s AdminResourceRole) Validate() error
type AdminResourceType ¶
type AdminResourceType string
Resource type.
const (
AdminResourceTypeAdmin AdminResourceType = "admin"
)
func (AdminResourceType) AllValues ¶
func (AdminResourceType) AllValues() []AdminResourceType
AllValues returns all AdminResourceType values.
func (*AdminResourceType) Decode ¶
func (s *AdminResourceType) Decode(d *jx.Decoder) error
Decode decodes AdminResourceType from json.
func (AdminResourceType) Encode ¶
func (s AdminResourceType) Encode(e *jx.Encoder)
Encode encodes AdminResourceType as json.
func (AdminResourceType) MarshalJSON ¶
func (s AdminResourceType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (AdminResourceType) MarshalText ¶
func (s AdminResourceType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*AdminResourceType) UnmarshalJSON ¶
func (s *AdminResourceType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AdminResourceType) UnmarshalText ¶
func (s *AdminResourceType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (AdminResourceType) Validate ¶
func (s AdminResourceType) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) GetShippingOption ¶
func (c *Client) GetShippingOption(ctx context.Context) (ShippingOption, error)
GetShippingOption invokes getShippingOption operation.
Test overlapping enum values with a discriminating field - should use carrier field to discriminate.
GET /shipping-option
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type Event ¶
type Event struct {
Type EventType // switch on this field
UserEvent UserEvent
SystemEvent SystemEvent
MetricEvent MetricEvent
}
Mixed discrimination - some fields by type, some by value. Ref: #/components/schemas/Event Event represents sum type.
func NewMetricEventEvent ¶
func NewMetricEventEvent(v MetricEvent) Event
NewMetricEventEvent returns new Event from MetricEvent.
func NewSystemEventEvent ¶
func NewSystemEventEvent(v SystemEvent) Event
NewSystemEventEvent returns new Event from SystemEvent.
func NewUserEventEvent ¶
NewUserEventEvent returns new Event from UserEvent.
func (Event) GetMetricEvent ¶
func (s Event) GetMetricEvent() (v MetricEvent, ok bool)
GetMetricEvent returns MetricEvent and true boolean if Event is MetricEvent.
func (Event) GetSystemEvent ¶
func (s Event) GetSystemEvent() (v SystemEvent, ok bool)
GetSystemEvent returns SystemEvent and true boolean if Event is SystemEvent.
func (Event) GetUserEvent ¶
GetUserEvent returns UserEvent and true boolean if Event is UserEvent.
func (Event) IsMetricEvent ¶
IsMetricEvent reports whether Event is MetricEvent.
func (Event) IsSystemEvent ¶
IsSystemEvent reports whether Event is SystemEvent.
func (Event) IsUserEvent ¶
IsUserEvent reports whether Event is UserEvent.
func (Event) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Event) SetMetricEvent ¶
func (s *Event) SetMetricEvent(v MetricEvent)
SetMetricEvent sets Event to MetricEvent.
func (*Event) SetSystemEvent ¶
func (s *Event) SetSystemEvent(v SystemEvent)
SetSystemEvent sets Event to SystemEvent.
func (*Event) SetUserEvent ¶
SetUserEvent sets Event to UserEvent.
func (*Event) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type FedExShippingOption ¶
type FedExShippingOption struct {
// Carrier identifier - unique enum value for discrimination.
Carrier FedExShippingOptionCarrier `json:"carrier"`
// Signature type - has overlapping values with USPS.
Signature FedExShippingOptionSignature `json:"signature"`
}
Ref: #/components/schemas/FedExShippingOption
func (*FedExShippingOption) Decode ¶
func (s *FedExShippingOption) Decode(d *jx.Decoder) error
Decode decodes FedExShippingOption from json.
func (*FedExShippingOption) Encode ¶
func (s *FedExShippingOption) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*FedExShippingOption) GetCarrier ¶
func (s *FedExShippingOption) GetCarrier() FedExShippingOptionCarrier
GetCarrier returns the value of Carrier.
func (*FedExShippingOption) GetSignature ¶
func (s *FedExShippingOption) GetSignature() FedExShippingOptionSignature
GetSignature returns the value of Signature.
func (*FedExShippingOption) MarshalJSON ¶
func (s *FedExShippingOption) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*FedExShippingOption) SetCarrier ¶
func (s *FedExShippingOption) SetCarrier(val FedExShippingOptionCarrier)
SetCarrier sets the value of Carrier.
func (*FedExShippingOption) SetSignature ¶
func (s *FedExShippingOption) SetSignature(val FedExShippingOptionSignature)
SetSignature sets the value of Signature.
func (*FedExShippingOption) UnmarshalJSON ¶
func (s *FedExShippingOption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*FedExShippingOption) Validate ¶
func (s *FedExShippingOption) Validate() error
type FedExShippingOptionCarrier ¶
type FedExShippingOptionCarrier string
Carrier identifier - unique enum value for discrimination.
const (
FedExShippingOptionCarrierFedex FedExShippingOptionCarrier = "fedex"
)
func (FedExShippingOptionCarrier) AllValues ¶
func (FedExShippingOptionCarrier) AllValues() []FedExShippingOptionCarrier
AllValues returns all FedExShippingOptionCarrier values.
func (*FedExShippingOptionCarrier) Decode ¶
func (s *FedExShippingOptionCarrier) Decode(d *jx.Decoder) error
Decode decodes FedExShippingOptionCarrier from json.
func (FedExShippingOptionCarrier) Encode ¶
func (s FedExShippingOptionCarrier) Encode(e *jx.Encoder)
Encode encodes FedExShippingOptionCarrier as json.
func (FedExShippingOptionCarrier) MarshalJSON ¶
func (s FedExShippingOptionCarrier) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (FedExShippingOptionCarrier) MarshalText ¶
func (s FedExShippingOptionCarrier) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*FedExShippingOptionCarrier) UnmarshalJSON ¶
func (s *FedExShippingOptionCarrier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*FedExShippingOptionCarrier) UnmarshalText ¶
func (s *FedExShippingOptionCarrier) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (FedExShippingOptionCarrier) Validate ¶
func (s FedExShippingOptionCarrier) Validate() error
type FedExShippingOptionSignature ¶
type FedExShippingOptionSignature string
Signature type - has overlapping values with USPS.
const ( FedExShippingOptionSignatureGift FedExShippingOptionSignature = "gift" FedExShippingOptionSignatureSample FedExShippingOptionSignature = "sample" FedExShippingOptionSignatureExpress FedExShippingOptionSignature = "express" )
func (FedExShippingOptionSignature) AllValues ¶
func (FedExShippingOptionSignature) AllValues() []FedExShippingOptionSignature
AllValues returns all FedExShippingOptionSignature values.
func (*FedExShippingOptionSignature) Decode ¶
func (s *FedExShippingOptionSignature) Decode(d *jx.Decoder) error
Decode decodes FedExShippingOptionSignature from json.
func (FedExShippingOptionSignature) Encode ¶
func (s FedExShippingOptionSignature) Encode(e *jx.Encoder)
Encode encodes FedExShippingOptionSignature as json.
func (FedExShippingOptionSignature) MarshalJSON ¶
func (s FedExShippingOptionSignature) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (FedExShippingOptionSignature) MarshalText ¶
func (s FedExShippingOptionSignature) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*FedExShippingOptionSignature) UnmarshalJSON ¶
func (s *FedExShippingOptionSignature) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*FedExShippingOptionSignature) UnmarshalText ¶
func (s *FedExShippingOptionSignature) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (FedExShippingOptionSignature) Validate ¶
func (s FedExShippingOptionSignature) Validate() error
type Handler ¶
type Handler interface {
// GetResource implements getResource operation.
//
// GET /resource
GetResource(ctx context.Context) (Resource, error)
// GetShippingOption implements getShippingOption operation.
//
// Test overlapping enum values with a discriminating field - should use carrier field to discriminate.
//
// GET /shipping-option
GetShippingOption(ctx context.Context) (ShippingOption, error)
// GetStatus implements getStatus operation.
//
// GET /status
GetStatus(ctx context.Context) (StatusResponse, error)
// LogEvent implements logEvent operation.
//
// POST /event
LogEvent(ctx context.Context, req Event) error
}
Handler handles operations described by OpenAPI v3 specification.
type InactiveStatus ¶
type InactiveStatus struct {
// Inactive states.
Status InactiveStatusStatus `json:"status"`
DeletedAt time.Time `json:"deletedAt"`
}
Ref: #/components/schemas/InactiveStatus
func (*InactiveStatus) Decode ¶
func (s *InactiveStatus) Decode(d *jx.Decoder) error
Decode decodes InactiveStatus from json.
func (*InactiveStatus) Encode ¶
func (s *InactiveStatus) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*InactiveStatus) GetDeletedAt ¶
func (s *InactiveStatus) GetDeletedAt() time.Time
GetDeletedAt returns the value of DeletedAt.
func (*InactiveStatus) GetStatus ¶
func (s *InactiveStatus) GetStatus() InactiveStatusStatus
GetStatus returns the value of Status.
func (*InactiveStatus) MarshalJSON ¶
func (s *InactiveStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*InactiveStatus) SetDeletedAt ¶
func (s *InactiveStatus) SetDeletedAt(val time.Time)
SetDeletedAt sets the value of DeletedAt.
func (*InactiveStatus) SetStatus ¶
func (s *InactiveStatus) SetStatus(val InactiveStatusStatus)
SetStatus sets the value of Status.
func (*InactiveStatus) UnmarshalJSON ¶
func (s *InactiveStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InactiveStatus) Validate ¶
func (s *InactiveStatus) Validate() error
type InactiveStatusStatus ¶
type InactiveStatusStatus string
Inactive states.
const ( InactiveStatusStatusInactive InactiveStatusStatus = "inactive" InactiveStatusStatusDeleted InactiveStatusStatus = "deleted" )
func (InactiveStatusStatus) AllValues ¶
func (InactiveStatusStatus) AllValues() []InactiveStatusStatus
AllValues returns all InactiveStatusStatus values.
func (*InactiveStatusStatus) Decode ¶
func (s *InactiveStatusStatus) Decode(d *jx.Decoder) error
Decode decodes InactiveStatusStatus from json.
func (InactiveStatusStatus) Encode ¶
func (s InactiveStatusStatus) Encode(e *jx.Encoder)
Encode encodes InactiveStatusStatus as json.
func (InactiveStatusStatus) MarshalJSON ¶
func (s InactiveStatusStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (InactiveStatusStatus) MarshalText ¶
func (s InactiveStatusStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*InactiveStatusStatus) UnmarshalJSON ¶
func (s *InactiveStatusStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InactiveStatusStatus) UnmarshalText ¶
func (s *InactiveStatusStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (InactiveStatusStatus) Validate ¶
func (s InactiveStatusStatus) Validate() error
type Invoker ¶
type Invoker interface {
// GetResource invokes getResource operation.
//
// GET /resource
GetResource(ctx context.Context) (Resource, error)
// GetShippingOption invokes getShippingOption operation.
//
// Test overlapping enum values with a discriminating field - should use carrier field to discriminate.
//
// GET /shipping-option
GetShippingOption(ctx context.Context) (ShippingOption, error)
// GetStatus invokes getStatus operation.
//
// GET /status
GetStatus(ctx context.Context) (StatusResponse, error)
// LogEvent invokes logEvent operation.
//
// POST /event
LogEvent(ctx context.Context, request Event) error
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type MetricEvent ¶
type MetricEvent struct {
// Metric event types - discriminated by value.
EventType MetricEventEventType `json:"eventType"`
// Numeric priority - discriminated by type.
Priority float64 `json:"priority"`
// Unique field - discriminated by name.
MetricId string `json:"metricId"`
}
Ref: #/components/schemas/MetricEvent
func (*MetricEvent) Decode ¶
func (s *MetricEvent) Decode(d *jx.Decoder) error
Decode decodes MetricEvent from json.
func (*MetricEvent) Encode ¶
func (s *MetricEvent) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MetricEvent) GetEventType ¶
func (s *MetricEvent) GetEventType() MetricEventEventType
GetEventType returns the value of EventType.
func (*MetricEvent) GetMetricId ¶
func (s *MetricEvent) GetMetricId() string
GetMetricId returns the value of MetricId.
func (*MetricEvent) GetPriority ¶
func (s *MetricEvent) GetPriority() float64
GetPriority returns the value of Priority.
func (*MetricEvent) MarshalJSON ¶
func (s *MetricEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MetricEvent) SetEventType ¶
func (s *MetricEvent) SetEventType(val MetricEventEventType)
SetEventType sets the value of EventType.
func (*MetricEvent) SetMetricId ¶
func (s *MetricEvent) SetMetricId(val string)
SetMetricId sets the value of MetricId.
func (*MetricEvent) SetPriority ¶
func (s *MetricEvent) SetPriority(val float64)
SetPriority sets the value of Priority.
func (*MetricEvent) UnmarshalJSON ¶
func (s *MetricEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MetricEvent) Validate ¶
func (s *MetricEvent) Validate() error
type MetricEventEventType ¶
type MetricEventEventType string
Metric event types - discriminated by value.
const ( MetricEventEventTypeMetricUpdate MetricEventEventType = "metric_update" MetricEventEventTypeMetricAlert MetricEventEventType = "metric_alert" )
func (MetricEventEventType) AllValues ¶
func (MetricEventEventType) AllValues() []MetricEventEventType
AllValues returns all MetricEventEventType values.
func (*MetricEventEventType) Decode ¶
func (s *MetricEventEventType) Decode(d *jx.Decoder) error
Decode decodes MetricEventEventType from json.
func (MetricEventEventType) Encode ¶
func (s MetricEventEventType) Encode(e *jx.Encoder)
Encode encodes MetricEventEventType as json.
func (MetricEventEventType) MarshalJSON ¶
func (s MetricEventEventType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (MetricEventEventType) MarshalText ¶
func (s MetricEventEventType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*MetricEventEventType) UnmarshalJSON ¶
func (s *MetricEventEventType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MetricEventEventType) UnmarshalText ¶
func (s *MetricEventEventType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (MetricEventEventType) Validate ¶
func (s MetricEventEventType) Validate() error
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( GetResourceOperation OperationName = "GetResource" GetShippingOptionOperation OperationName = "GetShippingOption" GetStatusOperation OperationName = "GetStatus" LogEventOperation OperationName = "LogEvent" )
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Resource ¶
type Resource struct {
Type ResourceType // switch on this field
UserResource UserResource
AdminResource AdminResource
}
Multiple fields with value-based discrimination. Ref: #/components/schemas/Resource Resource represents sum type.
func NewAdminResourceResource ¶
func NewAdminResourceResource(v AdminResource) Resource
NewAdminResourceResource returns new Resource from AdminResource.
func NewUserResourceResource ¶
func NewUserResourceResource(v UserResource) Resource
NewUserResourceResource returns new Resource from UserResource.
func (Resource) GetAdminResource ¶
func (s Resource) GetAdminResource() (v AdminResource, ok bool)
GetAdminResource returns AdminResource and true boolean if Resource is AdminResource.
func (Resource) GetUserResource ¶
func (s Resource) GetUserResource() (v UserResource, ok bool)
GetUserResource returns UserResource and true boolean if Resource is UserResource.
func (Resource) IsAdminResource ¶
IsAdminResource reports whether Resource is AdminResource.
func (Resource) IsUserResource ¶
IsUserResource reports whether Resource is UserResource.
func (Resource) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Resource) SetAdminResource ¶
func (s *Resource) SetAdminResource(v AdminResource)
SetAdminResource sets Resource to AdminResource.
func (*Resource) SetUserResource ¶
func (s *Resource) SetUserResource(v UserResource)
SetUserResource sets Resource to UserResource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ResourceType ¶
type ResourceType string
ResourceType is oneOf type of Resource.
const ( UserResourceResource ResourceType = "UserResource" AdminResourceResource ResourceType = "AdminResource" )
Possible values for ResourceType.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type ShippingOption ¶
type ShippingOption struct {
Type ShippingOptionType // switch on this field
USPSShippingOption USPSShippingOption
FedExShippingOption FedExShippingOption
}
Overlapping enum values with a discriminating field - carrier field discriminates, signature has overlapping values. Ref: #/components/schemas/ShippingOption ShippingOption represents sum type.
func NewFedExShippingOptionShippingOption ¶
func NewFedExShippingOptionShippingOption(v FedExShippingOption) ShippingOption
NewFedExShippingOptionShippingOption returns new ShippingOption from FedExShippingOption.
func NewUSPSShippingOptionShippingOption ¶
func NewUSPSShippingOptionShippingOption(v USPSShippingOption) ShippingOption
NewUSPSShippingOptionShippingOption returns new ShippingOption from USPSShippingOption.
func (*ShippingOption) Decode ¶
func (s *ShippingOption) Decode(d *jx.Decoder) error
Decode decodes ShippingOption from json.
func (ShippingOption) Encode ¶
func (s ShippingOption) Encode(e *jx.Encoder)
Encode encodes ShippingOption as json.
func (ShippingOption) GetFedExShippingOption ¶
func (s ShippingOption) GetFedExShippingOption() (v FedExShippingOption, ok bool)
GetFedExShippingOption returns FedExShippingOption and true boolean if ShippingOption is FedExShippingOption.
func (ShippingOption) GetUSPSShippingOption ¶
func (s ShippingOption) GetUSPSShippingOption() (v USPSShippingOption, ok bool)
GetUSPSShippingOption returns USPSShippingOption and true boolean if ShippingOption is USPSShippingOption.
func (ShippingOption) IsFedExShippingOption ¶
func (s ShippingOption) IsFedExShippingOption() bool
IsFedExShippingOption reports whether ShippingOption is FedExShippingOption.
func (ShippingOption) IsUSPSShippingOption ¶
func (s ShippingOption) IsUSPSShippingOption() bool
IsUSPSShippingOption reports whether ShippingOption is USPSShippingOption.
func (ShippingOption) MarshalJSON ¶
func (s ShippingOption) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ShippingOption) SetFedExShippingOption ¶
func (s *ShippingOption) SetFedExShippingOption(v FedExShippingOption)
SetFedExShippingOption sets ShippingOption to FedExShippingOption.
func (*ShippingOption) SetUSPSShippingOption ¶
func (s *ShippingOption) SetUSPSShippingOption(v USPSShippingOption)
SetUSPSShippingOption sets ShippingOption to USPSShippingOption.
func (*ShippingOption) UnmarshalJSON ¶
func (s *ShippingOption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ShippingOption) Validate ¶
func (s ShippingOption) Validate() error
type ShippingOptionType ¶
type ShippingOptionType string
ShippingOptionType is oneOf type of ShippingOption.
const ( USPSShippingOptionShippingOption ShippingOptionType = "USPSShippingOption" FedExShippingOptionShippingOption ShippingOptionType = "FedExShippingOption" )
Possible values for ShippingOptionType.
type StatusResponse ¶
type StatusResponse struct {
Type StatusResponseType // switch on this field
ActiveStatus ActiveStatus
InactiveStatus InactiveStatus
}
Basic enum value discrimination - different enum values for same field. Ref: #/components/schemas/StatusResponse StatusResponse represents sum type.
func NewActiveStatusStatusResponse ¶
func NewActiveStatusStatusResponse(v ActiveStatus) StatusResponse
NewActiveStatusStatusResponse returns new StatusResponse from ActiveStatus.
func NewInactiveStatusStatusResponse ¶
func NewInactiveStatusStatusResponse(v InactiveStatus) StatusResponse
NewInactiveStatusStatusResponse returns new StatusResponse from InactiveStatus.
func (*StatusResponse) Decode ¶
func (s *StatusResponse) Decode(d *jx.Decoder) error
Decode decodes StatusResponse from json.
func (StatusResponse) Encode ¶
func (s StatusResponse) Encode(e *jx.Encoder)
Encode encodes StatusResponse as json.
func (StatusResponse) GetActiveStatus ¶
func (s StatusResponse) GetActiveStatus() (v ActiveStatus, ok bool)
GetActiveStatus returns ActiveStatus and true boolean if StatusResponse is ActiveStatus.
func (StatusResponse) GetInactiveStatus ¶
func (s StatusResponse) GetInactiveStatus() (v InactiveStatus, ok bool)
GetInactiveStatus returns InactiveStatus and true boolean if StatusResponse is InactiveStatus.
func (StatusResponse) IsActiveStatus ¶
func (s StatusResponse) IsActiveStatus() bool
IsActiveStatus reports whether StatusResponse is ActiveStatus.
func (StatusResponse) IsInactiveStatus ¶
func (s StatusResponse) IsInactiveStatus() bool
IsInactiveStatus reports whether StatusResponse is InactiveStatus.
func (StatusResponse) MarshalJSON ¶
func (s StatusResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*StatusResponse) SetActiveStatus ¶
func (s *StatusResponse) SetActiveStatus(v ActiveStatus)
SetActiveStatus sets StatusResponse to ActiveStatus.
func (*StatusResponse) SetInactiveStatus ¶
func (s *StatusResponse) SetInactiveStatus(v InactiveStatus)
SetInactiveStatus sets StatusResponse to InactiveStatus.
func (*StatusResponse) UnmarshalJSON ¶
func (s *StatusResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (StatusResponse) Validate ¶
func (s StatusResponse) Validate() error
type StatusResponseType ¶
type StatusResponseType string
StatusResponseType is oneOf type of StatusResponse.
const ( ActiveStatusStatusResponse StatusResponseType = "ActiveStatus" InactiveStatusStatusResponse StatusResponseType = "InactiveStatus" )
Possible values for StatusResponseType.
type SystemEvent ¶
type SystemEvent struct {
// System event types - discriminated by value.
EventType SystemEventEventType `json:"eventType"`
// Integer priority - discriminated by type.
Priority int `json:"priority"`
// Unique field - discriminated by name.
SystemId string `json:"systemId"`
}
Ref: #/components/schemas/SystemEvent
func (*SystemEvent) Decode ¶
func (s *SystemEvent) Decode(d *jx.Decoder) error
Decode decodes SystemEvent from json.
func (*SystemEvent) Encode ¶
func (s *SystemEvent) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SystemEvent) GetEventType ¶
func (s *SystemEvent) GetEventType() SystemEventEventType
GetEventType returns the value of EventType.
func (*SystemEvent) GetPriority ¶
func (s *SystemEvent) GetPriority() int
GetPriority returns the value of Priority.
func (*SystemEvent) GetSystemId ¶
func (s *SystemEvent) GetSystemId() string
GetSystemId returns the value of SystemId.
func (*SystemEvent) MarshalJSON ¶
func (s *SystemEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SystemEvent) SetEventType ¶
func (s *SystemEvent) SetEventType(val SystemEventEventType)
SetEventType sets the value of EventType.
func (*SystemEvent) SetPriority ¶
func (s *SystemEvent) SetPriority(val int)
SetPriority sets the value of Priority.
func (*SystemEvent) SetSystemId ¶
func (s *SystemEvent) SetSystemId(val string)
SetSystemId sets the value of SystemId.
func (*SystemEvent) UnmarshalJSON ¶
func (s *SystemEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SystemEvent) Validate ¶
func (s *SystemEvent) Validate() error
type SystemEventEventType ¶
type SystemEventEventType string
System event types - discriminated by value.
const ( SystemEventEventTypeSystemStart SystemEventEventType = "system_start" SystemEventEventTypeSystemStop SystemEventEventType = "system_stop" )
func (SystemEventEventType) AllValues ¶
func (SystemEventEventType) AllValues() []SystemEventEventType
AllValues returns all SystemEventEventType values.
func (*SystemEventEventType) Decode ¶
func (s *SystemEventEventType) Decode(d *jx.Decoder) error
Decode decodes SystemEventEventType from json.
func (SystemEventEventType) Encode ¶
func (s SystemEventEventType) Encode(e *jx.Encoder)
Encode encodes SystemEventEventType as json.
func (SystemEventEventType) MarshalJSON ¶
func (s SystemEventEventType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (SystemEventEventType) MarshalText ¶
func (s SystemEventEventType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*SystemEventEventType) UnmarshalJSON ¶
func (s *SystemEventEventType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SystemEventEventType) UnmarshalText ¶
func (s *SystemEventEventType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (SystemEventEventType) Validate ¶
func (s SystemEventEventType) Validate() error
type USPSShippingOption ¶
type USPSShippingOption struct {
// Carrier identifier - unique enum value for discrimination.
Carrier USPSShippingOptionCarrier `json:"carrier"`
// Signature type - has overlapping values with FedEx.
Signature USPSShippingOptionSignature `json:"signature"`
}
Ref: #/components/schemas/USPSShippingOption
func (*USPSShippingOption) Decode ¶
func (s *USPSShippingOption) Decode(d *jx.Decoder) error
Decode decodes USPSShippingOption from json.
func (*USPSShippingOption) Encode ¶
func (s *USPSShippingOption) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*USPSShippingOption) GetCarrier ¶
func (s *USPSShippingOption) GetCarrier() USPSShippingOptionCarrier
GetCarrier returns the value of Carrier.
func (*USPSShippingOption) GetSignature ¶
func (s *USPSShippingOption) GetSignature() USPSShippingOptionSignature
GetSignature returns the value of Signature.
func (*USPSShippingOption) MarshalJSON ¶
func (s *USPSShippingOption) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*USPSShippingOption) SetCarrier ¶
func (s *USPSShippingOption) SetCarrier(val USPSShippingOptionCarrier)
SetCarrier sets the value of Carrier.
func (*USPSShippingOption) SetSignature ¶
func (s *USPSShippingOption) SetSignature(val USPSShippingOptionSignature)
SetSignature sets the value of Signature.
func (*USPSShippingOption) UnmarshalJSON ¶
func (s *USPSShippingOption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*USPSShippingOption) Validate ¶
func (s *USPSShippingOption) Validate() error
type USPSShippingOptionCarrier ¶
type USPSShippingOptionCarrier string
Carrier identifier - unique enum value for discrimination.
const (
USPSShippingOptionCarrierUsps USPSShippingOptionCarrier = "usps"
)
func (USPSShippingOptionCarrier) AllValues ¶
func (USPSShippingOptionCarrier) AllValues() []USPSShippingOptionCarrier
AllValues returns all USPSShippingOptionCarrier values.
func (*USPSShippingOptionCarrier) Decode ¶
func (s *USPSShippingOptionCarrier) Decode(d *jx.Decoder) error
Decode decodes USPSShippingOptionCarrier from json.
func (USPSShippingOptionCarrier) Encode ¶
func (s USPSShippingOptionCarrier) Encode(e *jx.Encoder)
Encode encodes USPSShippingOptionCarrier as json.
func (USPSShippingOptionCarrier) MarshalJSON ¶
func (s USPSShippingOptionCarrier) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (USPSShippingOptionCarrier) MarshalText ¶
func (s USPSShippingOptionCarrier) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*USPSShippingOptionCarrier) UnmarshalJSON ¶
func (s *USPSShippingOptionCarrier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*USPSShippingOptionCarrier) UnmarshalText ¶
func (s *USPSShippingOptionCarrier) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (USPSShippingOptionCarrier) Validate ¶
func (s USPSShippingOptionCarrier) Validate() error
type USPSShippingOptionSignature ¶
type USPSShippingOptionSignature string
Signature type - has overlapping values with FedEx.
const ( USPSShippingOptionSignatureGift USPSShippingOptionSignature = "gift" USPSShippingOptionSignatureSample USPSShippingOptionSignature = "sample" USPSShippingOptionSignatureStandard USPSShippingOptionSignature = "standard" )
func (USPSShippingOptionSignature) AllValues ¶
func (USPSShippingOptionSignature) AllValues() []USPSShippingOptionSignature
AllValues returns all USPSShippingOptionSignature values.
func (*USPSShippingOptionSignature) Decode ¶
func (s *USPSShippingOptionSignature) Decode(d *jx.Decoder) error
Decode decodes USPSShippingOptionSignature from json.
func (USPSShippingOptionSignature) Encode ¶
func (s USPSShippingOptionSignature) Encode(e *jx.Encoder)
Encode encodes USPSShippingOptionSignature as json.
func (USPSShippingOptionSignature) MarshalJSON ¶
func (s USPSShippingOptionSignature) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (USPSShippingOptionSignature) MarshalText ¶
func (s USPSShippingOptionSignature) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*USPSShippingOptionSignature) UnmarshalJSON ¶
func (s *USPSShippingOptionSignature) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*USPSShippingOptionSignature) UnmarshalText ¶
func (s *USPSShippingOptionSignature) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (USPSShippingOptionSignature) Validate ¶
func (s USPSShippingOptionSignature) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) GetResource ¶
func (UnimplementedHandler) GetResource(ctx context.Context) (r Resource, _ error)
GetResource implements getResource operation.
GET /resource
func (UnimplementedHandler) GetShippingOption ¶
func (UnimplementedHandler) GetShippingOption(ctx context.Context) (r ShippingOption, _ error)
GetShippingOption implements getShippingOption operation.
Test overlapping enum values with a discriminating field - should use carrier field to discriminate.
GET /shipping-option
func (UnimplementedHandler) GetStatus ¶
func (UnimplementedHandler) GetStatus(ctx context.Context) (r StatusResponse, _ error)
GetStatus implements getStatus operation.
GET /status
type UserEvent ¶
type UserEvent struct {
// User event types - discriminated by value.
EventType UserEventEventType `json:"eventType"`
// String priority - discriminated by type.
Priority string `json:"priority"`
// Unique field - discriminated by name.
UserId string `json:"userId"`
}
Ref: #/components/schemas/UserEvent
func (*UserEvent) GetEventType ¶
func (s *UserEvent) GetEventType() UserEventEventType
GetEventType returns the value of EventType.
func (*UserEvent) GetPriority ¶
GetPriority returns the value of Priority.
func (*UserEvent) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*UserEvent) SetEventType ¶
func (s *UserEvent) SetEventType(val UserEventEventType)
SetEventType sets the value of EventType.
func (*UserEvent) SetPriority ¶
SetPriority sets the value of Priority.
func (*UserEvent) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserEventEventType ¶
type UserEventEventType string
User event types - discriminated by value.
const ( UserEventEventTypeUserLogin UserEventEventType = "user_login" UserEventEventTypeUserLogout UserEventEventType = "user_logout" )
func (UserEventEventType) AllValues ¶
func (UserEventEventType) AllValues() []UserEventEventType
AllValues returns all UserEventEventType values.
func (*UserEventEventType) Decode ¶
func (s *UserEventEventType) Decode(d *jx.Decoder) error
Decode decodes UserEventEventType from json.
func (UserEventEventType) Encode ¶
func (s UserEventEventType) Encode(e *jx.Encoder)
Encode encodes UserEventEventType as json.
func (UserEventEventType) MarshalJSON ¶
func (s UserEventEventType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (UserEventEventType) MarshalText ¶
func (s UserEventEventType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*UserEventEventType) UnmarshalJSON ¶
func (s *UserEventEventType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UserEventEventType) UnmarshalText ¶
func (s *UserEventEventType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (UserEventEventType) Validate ¶
func (s UserEventEventType) Validate() error
type UserResource ¶
type UserResource struct {
// Resource type.
Type UserResourceType `json:"type"`
// User roles.
Role UserResourceRole `json:"role"`
UserId string `json:"userId"`
}
Ref: #/components/schemas/UserResource
func (*UserResource) Decode ¶
func (s *UserResource) Decode(d *jx.Decoder) error
Decode decodes UserResource from json.
func (*UserResource) Encode ¶
func (s *UserResource) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserResource) GetRole ¶
func (s *UserResource) GetRole() UserResourceRole
GetRole returns the value of Role.
func (*UserResource) GetType ¶
func (s *UserResource) GetType() UserResourceType
GetType returns the value of Type.
func (*UserResource) GetUserId ¶
func (s *UserResource) GetUserId() string
GetUserId returns the value of UserId.
func (*UserResource) MarshalJSON ¶
func (s *UserResource) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserResource) SetRole ¶
func (s *UserResource) SetRole(val UserResourceRole)
SetRole sets the value of Role.
func (*UserResource) SetType ¶
func (s *UserResource) SetType(val UserResourceType)
SetType sets the value of Type.
func (*UserResource) SetUserId ¶
func (s *UserResource) SetUserId(val string)
SetUserId sets the value of UserId.
func (*UserResource) UnmarshalJSON ¶
func (s *UserResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UserResource) Validate ¶
func (s *UserResource) Validate() error
type UserResourceRole ¶
type UserResourceRole string
User roles.
const ( UserResourceRoleViewer UserResourceRole = "viewer" UserResourceRoleEditor UserResourceRole = "editor" )
func (UserResourceRole) AllValues ¶
func (UserResourceRole) AllValues() []UserResourceRole
AllValues returns all UserResourceRole values.
func (*UserResourceRole) Decode ¶
func (s *UserResourceRole) Decode(d *jx.Decoder) error
Decode decodes UserResourceRole from json.
func (UserResourceRole) Encode ¶
func (s UserResourceRole) Encode(e *jx.Encoder)
Encode encodes UserResourceRole as json.
func (UserResourceRole) MarshalJSON ¶
func (s UserResourceRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (UserResourceRole) MarshalText ¶
func (s UserResourceRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*UserResourceRole) UnmarshalJSON ¶
func (s *UserResourceRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UserResourceRole) UnmarshalText ¶
func (s *UserResourceRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (UserResourceRole) Validate ¶
func (s UserResourceRole) Validate() error
type UserResourceType ¶
type UserResourceType string
Resource type.
const (
UserResourceTypeUser UserResourceType = "user"
)
func (UserResourceType) AllValues ¶
func (UserResourceType) AllValues() []UserResourceType
AllValues returns all UserResourceType values.
func (*UserResourceType) Decode ¶
func (s *UserResourceType) Decode(d *jx.Decoder) error
Decode decodes UserResourceType from json.
func (UserResourceType) Encode ¶
func (s UserResourceType) Encode(e *jx.Encoder)
Encode encodes UserResourceType as json.
func (UserResourceType) MarshalJSON ¶
func (s UserResourceType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (UserResourceType) MarshalText ¶
func (s UserResourceType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*UserResourceType) UnmarshalJSON ¶
func (s *UserResourceType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UserResourceType) UnmarshalText ¶
func (s *UserResourceType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (UserResourceType) Validate ¶
func (s UserResourceType) Validate() error
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go