Help us shape the future of Go! Take the 2026 Go Developer Survey

serviceapi

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRolesForBearerAuth

func GetRolesForBearerAuth(operation string) []string

GetRolesForBearerAuth returns the required roles for the given operation.

This is useful for authorization scenarios where you need to know which roles are required for an operation.

Example:

requiredRoles := GetRolesForBearerAuth(AddPetOperation)

Returns nil if the operation has no role requirements or if the operation is unknown.

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type BearerAuth

type BearerAuth struct {
	Token string
	Roles []string
}

func (*BearerAuth) GetRoles

func (s *BearerAuth) GetRoles() []string

GetRoles returns the value of Roles.

func (*BearerAuth) GetToken

func (s *BearerAuth) GetToken() string

GetToken returns the value of Token.

func (*BearerAuth) SetRoles

func (s *BearerAuth) SetRoles(val []string)

SetRoles sets the value of Roles.

func (*BearerAuth) SetToken

func (s *BearerAuth) SetToken(val string)

SetToken sets the value of Token.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) ServiceHoldsClear

func (c *Client) ServiceHoldsClear(ctx context.Context, params ServiceHoldsClearParams) (ServiceHoldsClearRes, error)

ServiceHoldsClear invokes ServiceHolds_clear operation.

Clear a hold by its key. Idempotent: clearing a missing hold succeeds with `changed` false.

DELETE /workspaces/{workspaceId}/holds/{key}

func (*Client) ServiceHoldsList

func (c *Client) ServiceHoldsList(ctx context.Context, params ServiceHoldsListParams) (ServiceHoldsListRes, error)

ServiceHoldsList invokes ServiceHolds_list operation.

The holds of a Workspace that are active now; a lapsed one is not listed.

GET /workspaces/{workspaceId}/holds

func (*Client) ServiceHoldsSet

func (c *Client) ServiceHoldsSet(ctx context.Context, request *HoldInput, params ServiceHoldsSetParams) (ServiceHoldsSetRes, error)

ServiceHoldsSet invokes ServiceHolds_set operation.

Set a hold under a key, or renew it by setting it again with a later expiry. Idempotent: setting the same hold twice changes nothing and says so (`changed` false); renewing with a different expiry is a change.

PUT /workspaces/{workspaceId}/holds/{key}

func (*Client) ServiceIdentityGet

func (c *Client) ServiceIdentityGet(ctx context.Context) (ServiceIdentityGetRes, error)

ServiceIdentityGet invokes ServiceIdentity_get operation.

The calling credential's own name, scopes and expiry.

GET /identity

func (*Client) ServiceTrackingHostFeedList

func (c *Client) ServiceTrackingHostFeedList(ctx context.Context, params ServiceTrackingHostFeedListParams) (ServiceTrackingHostFeedListRes, error)

ServiceTrackingHostFeedList invokes ServiceTrackingHostFeed_list operation.

The changes of Tracking domain hosts since an opaque cursor, in the order they were made: a host entering `dns_verified` or `serving`, moving between them, or leaving them, which is reported as `removed` and never as silence. A caller that applies each entry in order (provision on `dns_verified` and `serving`, tear down on `removed`) mirrors the Instance's verified hosts, and a caller that starts from an empty cursor rebuilds the whole set. Delivery is at-least-once: replaying a cursor returns the same entries, so applying one twice must change nothing.

GET /domains/changes

func (*Client) ServiceUsageList

func (c *Client) ServiceUsageList(ctx context.Context, params ServiceUsageListParams) (ServiceUsageListRes, error)

ServiceUsageList invokes ServiceUsage_list operation.

The figures of every Workspace for a Usage period, by Workspace id: Live usage for the open period, Usage snapshots for a closed one. Never a recount on read.

GET /usage

func (*Client) ServiceWorkspaceFeedList

func (c *Client) ServiceWorkspaceFeedList(ctx context.Context, params ServiceWorkspaceFeedListParams) (ServiceWorkspaceFeedListRes, error)

ServiceWorkspaceFeedList invokes ServiceWorkspaceFeed_list operation.

The Workspaces created or changed since an opaque cursor, each with all of its owners, in a stable order by change position. A change is a new Workspace, an owner added, removed or transferred, or an owner's email or verification changing. Delivery is at-least-once: replaying a cursor returns the same entries, and an empty cursor starts from the beginning.

GET /workspaces/changes

func (*Client) ServiceWorkspaceUsageGet

func (c *Client) ServiceWorkspaceUsageGet(ctx context.Context, params ServiceWorkspaceUsageGetParams) (ServiceWorkspaceUsageGetRes, error)

ServiceWorkspaceUsageGet invokes ServiceWorkspaceUsage_get operation.

The figures of one Workspace for a Usage period: Live usage (not final, with the in-flight sends as their own figure) for the open period, Usage snapshots (final) for a closed one. Never a recount on read.

GET /workspaces/{workspaceId}/usage

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 EmailAddress

type EmailAddress string

func (*EmailAddress) Decode

func (s *EmailAddress) Decode(d *jx.Decoder) error

Decode decodes EmailAddress from json.

func (EmailAddress) Encode

func (s EmailAddress) Encode(e *jx.Encoder)

Encode encodes EmailAddress as json.

func (EmailAddress) MarshalJSON

func (s EmailAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EmailAddress) UnmarshalJSON

func (s *EmailAddress) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (EmailAddress) Validate

func (s EmailAddress) Validate() error

type EntityId

type EntityId int64

func (*EntityId) Decode

func (s *EntityId) Decode(d *jx.Decoder) error

Decode decodes EntityId from json.

func (EntityId) Encode

func (s EntityId) Encode(e *jx.Encoder)

Encode encodes EntityId as json.

func (EntityId) MarshalJSON

func (s EntityId) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EntityId) UnmarshalJSON

func (s *EntityId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Handler

type Handler interface {
	// ServiceHoldsClear implements ServiceHolds_clear operation.
	//
	// Clear a hold by its key. Idempotent: clearing a missing hold succeeds with `changed` false.
	//
	// DELETE /workspaces/{workspaceId}/holds/{key}
	ServiceHoldsClear(ctx context.Context, params ServiceHoldsClearParams) (ServiceHoldsClearRes, error)
	// ServiceHoldsList implements ServiceHolds_list operation.
	//
	// The holds of a Workspace that are active now; a lapsed one is not listed.
	//
	// GET /workspaces/{workspaceId}/holds
	ServiceHoldsList(ctx context.Context, params ServiceHoldsListParams) (ServiceHoldsListRes, error)
	// ServiceHoldsSet implements ServiceHolds_set operation.
	//
	// Set a hold under a key, or renew it by setting it again with a later expiry. Idempotent: setting the
	// same hold twice changes nothing and says so (`changed` false); renewing with a different expiry is a
	// change.
	//
	// PUT /workspaces/{workspaceId}/holds/{key}
	ServiceHoldsSet(ctx context.Context, req *HoldInput, params ServiceHoldsSetParams) (ServiceHoldsSetRes, error)
	// ServiceIdentityGet implements ServiceIdentity_get operation.
	//
	// The calling credential's own name, scopes and expiry.
	//
	// GET /identity
	ServiceIdentityGet(ctx context.Context) (ServiceIdentityGetRes, error)
	// ServiceTrackingHostFeedList implements ServiceTrackingHostFeed_list operation.
	//
	// The changes of Tracking domain hosts since an opaque cursor, in the order they were made: a host
	// entering `dns_verified` or `serving`, moving between them, or leaving them, which is reported as
	// `removed` and never as silence. A caller that applies each entry in order (provision on
	// `dns_verified` and `serving`, tear down on `removed`) mirrors the Instance's verified hosts, and a
	// caller that starts from an empty cursor rebuilds the whole set. Delivery is at-least-once: replaying
	// a cursor returns the same entries, so applying one twice must change nothing.
	//
	// GET /domains/changes
	ServiceTrackingHostFeedList(ctx context.Context, params ServiceTrackingHostFeedListParams) (ServiceTrackingHostFeedListRes, error)
	// ServiceUsageList implements ServiceUsage_list operation.
	//
	// The figures of every Workspace for a Usage period, by Workspace id: Live usage for the open period,
	// Usage snapshots for a closed one. Never a recount on read.
	//
	// GET /usage
	ServiceUsageList(ctx context.Context, params ServiceUsageListParams) (ServiceUsageListRes, error)
	// ServiceWorkspaceFeedList implements ServiceWorkspaceFeed_list operation.
	//
	// The Workspaces created or changed since an opaque cursor, each with all of its owners, in a stable
	// order by change position. A change is a new Workspace, an owner added, removed or transferred, or an
	// owner's email or verification changing. Delivery is at-least-once: replaying a cursor returns the
	// same entries, and an empty cursor starts from the beginning.
	//
	// GET /workspaces/changes
	ServiceWorkspaceFeedList(ctx context.Context, params ServiceWorkspaceFeedListParams) (ServiceWorkspaceFeedListRes, error)
	// ServiceWorkspaceUsageGet implements ServiceWorkspaceUsage_get operation.
	//
	// The figures of one Workspace for a Usage period: Live usage (not final, with the in-flight sends as
	// their own figure) for the open period, Usage snapshots (final) for a closed one. Never a recount on
	// read.
	//
	// GET /workspaces/{workspaceId}/usage
	ServiceWorkspaceUsageGet(ctx context.Context, params ServiceWorkspaceUsageGetParams) (ServiceWorkspaceUsageGetRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type HoldClearResult

type HoldClearResult struct {
	// False when no such hold was set and nothing changed, so a retry is visibly harmless.
	Changed bool `json:"changed"`
}

The outcome of clearing a hold. Ref: #/components/schemas/HoldClearResult

func (*HoldClearResult) Decode

func (s *HoldClearResult) Decode(d *jx.Decoder) error

Decode decodes HoldClearResult from json.

func (*HoldClearResult) Encode

func (s *HoldClearResult) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HoldClearResult) GetChanged

func (s *HoldClearResult) GetChanged() bool

GetChanged returns the value of Changed.

func (*HoldClearResult) MarshalJSON

func (s *HoldClearResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HoldClearResult) SetChanged

func (s *HoldClearResult) SetChanged(val bool)

SetChanged sets the value of Changed.

func (*HoldClearResult) UnmarshalJSON

func (s *HoldClearResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type HoldInput

type HoldInput struct {
	// A machine code for the reason: lowercase letters, digits and underscores.
	ReasonCode string `json:"reasonCode"`
	// The message shown to the Workspace Owner, as given.
	Message string `json:"message"`
	// Where the Workspace's Owners and Admins can resolve the hold, shown as a link next to the message:
	// an absolute https URL. Omit it to give none; setting the hold again without it removes a stored one.
	ActionUrl OptNilString `json:"actionUrl"`
	// Required; in the future and no further than the configured maximum from now.
	ExpiresAt Timestamp `json:"expiresAt"`
}

Setting or renewing a hold. Ref: #/components/schemas/HoldInput

func (*HoldInput) Decode

func (s *HoldInput) Decode(d *jx.Decoder) error

Decode decodes HoldInput from json.

func (*HoldInput) Encode

func (s *HoldInput) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HoldInput) GetActionUrl

func (s *HoldInput) GetActionUrl() OptNilString

GetActionUrl returns the value of ActionUrl.

func (*HoldInput) GetExpiresAt

func (s *HoldInput) GetExpiresAt() Timestamp

GetExpiresAt returns the value of ExpiresAt.

func (*HoldInput) GetMessage

func (s *HoldInput) GetMessage() string

GetMessage returns the value of Message.

func (*HoldInput) GetReasonCode

func (s *HoldInput) GetReasonCode() string

GetReasonCode returns the value of ReasonCode.

func (*HoldInput) MarshalJSON

func (s *HoldInput) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HoldInput) SetActionUrl

func (s *HoldInput) SetActionUrl(val OptNilString)

SetActionUrl sets the value of ActionUrl.

func (*HoldInput) SetExpiresAt

func (s *HoldInput) SetExpiresAt(val Timestamp)

SetExpiresAt sets the value of ExpiresAt.

func (*HoldInput) SetMessage

func (s *HoldInput) SetMessage(val string)

SetMessage sets the value of Message.

func (*HoldInput) SetReasonCode

func (s *HoldInput) SetReasonCode(val string)

SetReasonCode sets the value of ReasonCode.

func (*HoldInput) UnmarshalJSON

func (s *HoldInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*HoldInput) Validate

func (s *HoldInput) Validate() error

type HoldList

type HoldList struct {
	Items []HoldResource `json:"items"`
}

The active holds of a Workspace. Ref: #/components/schemas/HoldList

func (*HoldList) Decode

func (s *HoldList) Decode(d *jx.Decoder) error

Decode decodes HoldList from json.

func (*HoldList) Encode

func (s *HoldList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HoldList) GetItems

func (s *HoldList) GetItems() []HoldResource

GetItems returns the value of Items.

func (*HoldList) MarshalJSON

func (s *HoldList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HoldList) SetItems

func (s *HoldList) SetItems(val []HoldResource)

SetItems sets the value of Items.

func (*HoldList) UnmarshalJSON

func (s *HoldList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*HoldList) Validate

func (s *HoldList) Validate() error

type HoldResource

type HoldResource struct {
	// The key the setter chose; unique per Workspace.
	Key string `json:"key"`
	// A machine code for the reason.
	ReasonCode string `json:"reasonCode"`
	// The message shown to the Workspace Owner, as given.
	Message string `json:"message"`
	// Where the Workspace's Owners and Admins can resolve the hold; absent when none was given.
	ActionUrl OptNilString `json:"actionUrl"`
	// When the hold stops freezing sending unless its setter renews it.
	ExpiresAt Timestamp `json:"expiresAt"`
	// The name of the Service credential that last set it.
	SetBy string `json:"setBy"`
	// When the hold was first set.
	CreatedAt Timestamp `json:"createdAt"`
	// When the hold was last set or renewed.
	UpdatedAt Timestamp `json:"updatedAt"`
}

A Staff hold: one reversible freeze of a Workspace's outbound sending (ADR 0009). Ref: #/components/schemas/HoldResource

func (*HoldResource) Decode

func (s *HoldResource) Decode(d *jx.Decoder) error

Decode decodes HoldResource from json.

func (*HoldResource) Encode

func (s *HoldResource) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HoldResource) GetActionUrl

func (s *HoldResource) GetActionUrl() OptNilString

GetActionUrl returns the value of ActionUrl.

func (*HoldResource) GetCreatedAt

func (s *HoldResource) GetCreatedAt() Timestamp

GetCreatedAt returns the value of CreatedAt.

func (*HoldResource) GetExpiresAt

func (s *HoldResource) GetExpiresAt() Timestamp

GetExpiresAt returns the value of ExpiresAt.

func (*HoldResource) GetKey

func (s *HoldResource) GetKey() string

GetKey returns the value of Key.

func (*HoldResource) GetMessage

func (s *HoldResource) GetMessage() string

GetMessage returns the value of Message.

func (*HoldResource) GetReasonCode

func (s *HoldResource) GetReasonCode() string

GetReasonCode returns the value of ReasonCode.

func (*HoldResource) GetSetBy

func (s *HoldResource) GetSetBy() string

GetSetBy returns the value of SetBy.

func (*HoldResource) GetUpdatedAt

func (s *HoldResource) GetUpdatedAt() Timestamp

GetUpdatedAt returns the value of UpdatedAt.

func (*HoldResource) MarshalJSON

func (s *HoldResource) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HoldResource) SetActionUrl

func (s *HoldResource) SetActionUrl(val OptNilString)

SetActionUrl sets the value of ActionUrl.

func (*HoldResource) SetCreatedAt

func (s *HoldResource) SetCreatedAt(val Timestamp)

SetCreatedAt sets the value of CreatedAt.

func (*HoldResource) SetExpiresAt

func (s *HoldResource) SetExpiresAt(val Timestamp)

SetExpiresAt sets the value of ExpiresAt.

func (*HoldResource) SetKey

func (s *HoldResource) SetKey(val string)

SetKey sets the value of Key.

func (*HoldResource) SetMessage

func (s *HoldResource) SetMessage(val string)

SetMessage sets the value of Message.

func (*HoldResource) SetReasonCode

func (s *HoldResource) SetReasonCode(val string)

SetReasonCode sets the value of ReasonCode.

func (*HoldResource) SetSetBy

func (s *HoldResource) SetSetBy(val string)

SetSetBy sets the value of SetBy.

func (*HoldResource) SetUpdatedAt

func (s *HoldResource) SetUpdatedAt(val Timestamp)

SetUpdatedAt sets the value of UpdatedAt.

func (*HoldResource) UnmarshalJSON

func (s *HoldResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type HoldSetResult

type HoldSetResult struct {
	// False when the hold was already set exactly so and nothing changed, so a retry is visibly harmless.
	Changed bool `json:"changed"`
	// The hold as it is stored now.
	Hold HoldResource `json:"hold"`
}

The outcome of setting a hold. Ref: #/components/schemas/HoldSetResult

func (*HoldSetResult) Decode

func (s *HoldSetResult) Decode(d *jx.Decoder) error

Decode decodes HoldSetResult from json.

func (*HoldSetResult) Encode

func (s *HoldSetResult) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HoldSetResult) GetChanged

func (s *HoldSetResult) GetChanged() bool

GetChanged returns the value of Changed.

func (*HoldSetResult) GetHold

func (s *HoldSetResult) GetHold() HoldResource

GetHold returns the value of Hold.

func (*HoldSetResult) MarshalJSON

func (s *HoldSetResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HoldSetResult) SetChanged

func (s *HoldSetResult) SetChanged(val bool)

SetChanged sets the value of Changed.

func (*HoldSetResult) SetHold

func (s *HoldSetResult) SetHold(val HoldResource)

SetHold sets the value of Hold.

func (*HoldSetResult) UnmarshalJSON

func (s *HoldSetResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Invoker

type Invoker interface {
	// ServiceHoldsClear invokes ServiceHolds_clear operation.
	//
	// Clear a hold by its key. Idempotent: clearing a missing hold succeeds with `changed` false.
	//
	// DELETE /workspaces/{workspaceId}/holds/{key}
	ServiceHoldsClear(ctx context.Context, params ServiceHoldsClearParams) (ServiceHoldsClearRes, error)
	// ServiceHoldsList invokes ServiceHolds_list operation.
	//
	// The holds of a Workspace that are active now; a lapsed one is not listed.
	//
	// GET /workspaces/{workspaceId}/holds
	ServiceHoldsList(ctx context.Context, params ServiceHoldsListParams) (ServiceHoldsListRes, error)
	// ServiceHoldsSet invokes ServiceHolds_set operation.
	//
	// Set a hold under a key, or renew it by setting it again with a later expiry. Idempotent: setting the
	// same hold twice changes nothing and says so (`changed` false); renewing with a different expiry is a
	// change.
	//
	// PUT /workspaces/{workspaceId}/holds/{key}
	ServiceHoldsSet(ctx context.Context, request *HoldInput, params ServiceHoldsSetParams) (ServiceHoldsSetRes, error)
	// ServiceIdentityGet invokes ServiceIdentity_get operation.
	//
	// The calling credential's own name, scopes and expiry.
	//
	// GET /identity
	ServiceIdentityGet(ctx context.Context) (ServiceIdentityGetRes, error)
	// ServiceTrackingHostFeedList invokes ServiceTrackingHostFeed_list operation.
	//
	// The changes of Tracking domain hosts since an opaque cursor, in the order they were made: a host
	// entering `dns_verified` or `serving`, moving between them, or leaving them, which is reported as
	// `removed` and never as silence. A caller that applies each entry in order (provision on
	// `dns_verified` and `serving`, tear down on `removed`) mirrors the Instance's verified hosts, and a
	// caller that starts from an empty cursor rebuilds the whole set. Delivery is at-least-once: replaying
	// a cursor returns the same entries, so applying one twice must change nothing.
	//
	// GET /domains/changes
	ServiceTrackingHostFeedList(ctx context.Context, params ServiceTrackingHostFeedListParams) (ServiceTrackingHostFeedListRes, error)
	// ServiceUsageList invokes ServiceUsage_list operation.
	//
	// The figures of every Workspace for a Usage period, by Workspace id: Live usage for the open period,
	// Usage snapshots for a closed one. Never a recount on read.
	//
	// GET /usage
	ServiceUsageList(ctx context.Context, params ServiceUsageListParams) (ServiceUsageListRes, error)
	// ServiceWorkspaceFeedList invokes ServiceWorkspaceFeed_list operation.
	//
	// The Workspaces created or changed since an opaque cursor, each with all of its owners, in a stable
	// order by change position. A change is a new Workspace, an owner added, removed or transferred, or an
	// owner's email or verification changing. Delivery is at-least-once: replaying a cursor returns the
	// same entries, and an empty cursor starts from the beginning.
	//
	// GET /workspaces/changes
	ServiceWorkspaceFeedList(ctx context.Context, params ServiceWorkspaceFeedListParams) (ServiceWorkspaceFeedListRes, error)
	// ServiceWorkspaceUsageGet invokes ServiceWorkspaceUsage_get operation.
	//
	// The figures of one Workspace for a Usage period: Live usage (not final, with the in-flight sends as
	// their own figure) for the open period, Usage snapshots (final) for a closed one. Never a recount on
	// read.
	//
	// GET /workspaces/{workspaceId}/usage
	ServiceWorkspaceUsageGet(ctx context.Context, params ServiceWorkspaceUsageGetParams) (ServiceWorkspaceUsageGetRes, 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

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

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) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	ServiceHoldsClearOperation           OperationName = "ServiceHoldsClear"
	ServiceHoldsListOperation            OperationName = "ServiceHoldsList"
	ServiceHoldsSetOperation             OperationName = "ServiceHoldsSet"
	ServiceIdentityGetOperation          OperationName = "ServiceIdentityGet"
	ServiceTrackingHostFeedListOperation OperationName = "ServiceTrackingHostFeedList"
	ServiceUsageListOperation            OperationName = "ServiceUsageList"
	ServiceWorkspaceFeedListOperation    OperationName = "ServiceWorkspaceFeedList"
	ServiceWorkspaceUsageGetOperation    OperationName = "ServiceWorkspaceUsageGet"
)

type OptInt32

type OptInt32 struct {
	Value int32
	Set   bool
}

OptInt32 is optional int32.

func NewOptInt32

func NewOptInt32(v int32) OptInt32

NewOptInt32 returns new OptInt32 with value set to v.

func (*OptInt32) Decode

func (o *OptInt32) Decode(d *jx.Decoder) error

Decode decodes int32 from json.

func (OptInt32) Encode

func (o OptInt32) Encode(e *jx.Encoder)

Encode encodes int32 as json.

func (OptInt32) Get

func (o OptInt32) Get() (v int32, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt32) IsSet

func (o OptInt32) IsSet() bool

IsSet returns true if OptInt32 was set.

func (OptInt32) MarshalJSON

func (s OptInt32) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt32) Or

func (o OptInt32) Or(d int32) int32

Or returns value if set, or given parameter if does not.

func (*OptInt32) Reset

func (o *OptInt32) Reset()

Reset unsets value.

func (*OptInt32) SetTo

func (o *OptInt32) SetTo(v int32)

SetTo sets value to v.

func (*OptInt32) UnmarshalJSON

func (s *OptInt32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilString

type OptNilString struct {
	Value string
	Set   bool
	Null  bool
}

OptNilString is optional nullable string.

func NewOptNilString

func NewOptNilString(v string) OptNilString

NewOptNilString returns new OptNilString with value set to v.

func (*OptNilString) Decode

func (o *OptNilString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptNilString) Encode

func (o OptNilString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptNilString) Get

func (o OptNilString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptNilString) IsEmpty

func (o OptNilString) IsEmpty() bool

IsEmpty returns true if the field was omitted from the payload (not Set and not Null).

func (OptNilString) IsNull

func (o OptNilString) IsNull() bool

IsNull returns true if value is Null.

func (OptNilString) IsSet

func (o OptNilString) IsSet() bool

IsSet returns true if OptNilString was set.

func (OptNilString) MarshalJSON

func (s OptNilString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilString) Or

func (o OptNilString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptNilString) Reset

func (o *OptNilString) Reset()

Reset unsets value.

func (*OptNilString) SetTo

func (o *OptNilString) SetTo(v string)

SetTo sets value to v.

func (*OptNilString) SetToNull

func (o *OptNilString) SetToNull()

SetToNull sets value to null.

func (*OptNilString) UnmarshalJSON

func (s *OptNilString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilTimestamp

type OptNilTimestamp struct {
	Value Timestamp
	Set   bool
	Null  bool
}

OptNilTimestamp is optional nullable Timestamp.

func NewOptNilTimestamp

func NewOptNilTimestamp(v Timestamp) OptNilTimestamp

NewOptNilTimestamp returns new OptNilTimestamp with value set to v.

func (*OptNilTimestamp) Decode

func (o *OptNilTimestamp) Decode(d *jx.Decoder) error

Decode decodes Timestamp from json.

func (OptNilTimestamp) Encode

func (o OptNilTimestamp) Encode(e *jx.Encoder)

Encode encodes Timestamp as json.

func (OptNilTimestamp) Get

func (o OptNilTimestamp) Get() (v Timestamp, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptNilTimestamp) IsEmpty

func (o OptNilTimestamp) IsEmpty() bool

IsEmpty returns true if the field was omitted from the payload (not Set and not Null).

func (OptNilTimestamp) IsNull

func (o OptNilTimestamp) IsNull() bool

IsNull returns true if value is Null.

func (OptNilTimestamp) IsSet

func (o OptNilTimestamp) IsSet() bool

IsSet returns true if OptNilTimestamp was set.

func (OptNilTimestamp) MarshalJSON

func (s OptNilTimestamp) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilTimestamp) Or

Or returns value if set, or given parameter if does not.

func (*OptNilTimestamp) Reset

func (o *OptNilTimestamp) Reset()

Reset unsets value.

func (*OptNilTimestamp) SetTo

func (o *OptNilTimestamp) SetTo(v Timestamp)

SetTo sets value to v.

func (*OptNilTimestamp) SetToNull

func (o *OptNilTimestamp) SetToNull()

SetToNull sets value to null.

func (*OptNilTimestamp) UnmarshalJSON

func (s *OptNilTimestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptProblemCode

type OptProblemCode struct {
	Value ProblemCode
	Set   bool
}

OptProblemCode is optional ProblemCode.

func NewOptProblemCode

func NewOptProblemCode(v ProblemCode) OptProblemCode

NewOptProblemCode returns new OptProblemCode with value set to v.

func (*OptProblemCode) Decode

func (o *OptProblemCode) Decode(d *jx.Decoder) error

Decode decodes ProblemCode from json.

func (OptProblemCode) Encode

func (o OptProblemCode) Encode(e *jx.Encoder)

Encode encodes ProblemCode as json.

func (OptProblemCode) Get

func (o OptProblemCode) Get() (v ProblemCode, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptProblemCode) IsSet

func (o OptProblemCode) IsSet() bool

IsSet returns true if OptProblemCode was set.

func (OptProblemCode) MarshalJSON

func (s OptProblemCode) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptProblemCode) Or

Or returns value if set, or given parameter if does not.

func (*OptProblemCode) Reset

func (o *OptProblemCode) Reset()

Reset unsets value.

func (*OptProblemCode) SetTo

func (o *OptProblemCode) SetTo(v ProblemCode)

SetTo sets value to v.

func (*OptProblemCode) UnmarshalJSON

func (s *OptProblemCode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptProblemDebug

type OptProblemDebug struct {
	Value ProblemDebug
	Set   bool
}

OptProblemDebug is optional ProblemDebug.

func NewOptProblemDebug

func NewOptProblemDebug(v ProblemDebug) OptProblemDebug

NewOptProblemDebug returns new OptProblemDebug with value set to v.

func (*OptProblemDebug) Decode

func (o *OptProblemDebug) Decode(d *jx.Decoder) error

Decode decodes ProblemDebug from json.

func (OptProblemDebug) Encode

func (o OptProblemDebug) Encode(e *jx.Encoder)

Encode encodes ProblemDebug as json.

func (OptProblemDebug) Get

func (o OptProblemDebug) Get() (v ProblemDebug, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptProblemDebug) IsSet

func (o OptProblemDebug) IsSet() bool

IsSet returns true if OptProblemDebug was set.

func (OptProblemDebug) MarshalJSON

func (s OptProblemDebug) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptProblemDebug) Or

Or returns value if set, or given parameter if does not.

func (*OptProblemDebug) Reset

func (o *OptProblemDebug) Reset()

Reset unsets value.

func (*OptProblemDebug) SetTo

func (o *OptProblemDebug) SetTo(v ProblemDebug)

SetTo sets value to v.

func (*OptProblemDebug) UnmarshalJSON

func (s *OptProblemDebug) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptProblemDetailsErrors

type OptProblemDetailsErrors struct {
	Value ProblemDetailsErrors
	Set   bool
}

OptProblemDetailsErrors is optional ProblemDetailsErrors.

func NewOptProblemDetailsErrors

func NewOptProblemDetailsErrors(v ProblemDetailsErrors) OptProblemDetailsErrors

NewOptProblemDetailsErrors returns new OptProblemDetailsErrors with value set to v.

func (*OptProblemDetailsErrors) Decode

func (o *OptProblemDetailsErrors) Decode(d *jx.Decoder) error

Decode decodes ProblemDetailsErrors from json.

func (OptProblemDetailsErrors) Encode

func (o OptProblemDetailsErrors) Encode(e *jx.Encoder)

Encode encodes ProblemDetailsErrors as json.

func (OptProblemDetailsErrors) Get

Get returns value and boolean that denotes whether value was set.

func (OptProblemDetailsErrors) IsSet

func (o OptProblemDetailsErrors) IsSet() bool

IsSet returns true if OptProblemDetailsErrors was set.

func (OptProblemDetailsErrors) MarshalJSON

func (s OptProblemDetailsErrors) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptProblemDetailsErrors) Or

Or returns value if set, or given parameter if does not.

func (*OptProblemDetailsErrors) Reset

func (o *OptProblemDetailsErrors) Reset()

Reset unsets value.

func (*OptProblemDetailsErrors) SetTo

SetTo sets value to v.

func (*OptProblemDetailsErrors) UnmarshalJSON

func (s *OptProblemDetailsErrors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptProblemDetailsFields

type OptProblemDetailsFields struct {
	Value ProblemDetailsFields
	Set   bool
}

OptProblemDetailsFields is optional ProblemDetailsFields.

func NewOptProblemDetailsFields

func NewOptProblemDetailsFields(v ProblemDetailsFields) OptProblemDetailsFields

NewOptProblemDetailsFields returns new OptProblemDetailsFields with value set to v.

func (*OptProblemDetailsFields) Decode

func (o *OptProblemDetailsFields) Decode(d *jx.Decoder) error

Decode decodes ProblemDetailsFields from json.

func (OptProblemDetailsFields) Encode

func (o OptProblemDetailsFields) Encode(e *jx.Encoder)

Encode encodes ProblemDetailsFields as json.

func (OptProblemDetailsFields) Get

Get returns value and boolean that denotes whether value was set.

func (OptProblemDetailsFields) IsSet

func (o OptProblemDetailsFields) IsSet() bool

IsSet returns true if OptProblemDetailsFields was set.

func (OptProblemDetailsFields) MarshalJSON

func (s OptProblemDetailsFields) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptProblemDetailsFields) Or

Or returns value if set, or given parameter if does not.

func (*OptProblemDetailsFields) Reset

func (o *OptProblemDetailsFields) Reset()

Reset unsets value.

func (*OptProblemDetailsFields) SetTo

SetTo sets value to v.

func (*OptProblemDetailsFields) UnmarshalJSON

func (s *OptProblemDetailsFields) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

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 ProblemCode

type ProblemCode string

A machine-readable reason a client branches on, beyond the HTTP status. Ref: #/components/schemas/ProblemCode

const (
	ProblemCodeSecondFactorRequired      ProblemCode = "second_factor_required"
	ProblemCodeEmailVerificationRequired ProblemCode = "email_verification_required"
	ProblemCodeSignupClosed              ProblemCode = "signup_closed"
)

func (ProblemCode) AllValues

func (ProblemCode) AllValues() []ProblemCode

AllValues returns all ProblemCode values.

func (*ProblemCode) Decode

func (s *ProblemCode) Decode(d *jx.Decoder) error

Decode decodes ProblemCode from json.

func (ProblemCode) Encode

func (s ProblemCode) Encode(e *jx.Encoder)

Encode encodes ProblemCode as json.

func (ProblemCode) MarshalJSON

func (s ProblemCode) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ProblemCode) MarshalText

func (s ProblemCode) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ProblemCode) UnmarshalJSON

func (s *ProblemCode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProblemCode) UnmarshalText

func (s *ProblemCode) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ProblemCode) Validate

func (s ProblemCode) Validate() error

type ProblemDebug

type ProblemDebug struct {
	// The error that failed the request, or the panic value.
	Error string `json:"error"`
	// The goroutine stack of a panic; absent for an error a handler returned.
	Stack OptString `json:"stack"`
	// The request id the server log carries for this request.
	RequestId OptString `json:"requestId"`
	// The HTTP method of the failed request.
	Method string `json:"method"`
	// The path of the failed request.
	Path string `json:"path"`
}

What a development server adds to a 500 so the page can show the fault; a production Instance never sends it. Ref: #/components/schemas/ProblemDebug

func (*ProblemDebug) Decode

func (s *ProblemDebug) Decode(d *jx.Decoder) error

Decode decodes ProblemDebug from json.

func (*ProblemDebug) Encode

func (s *ProblemDebug) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProblemDebug) GetError

func (s *ProblemDebug) GetError() string

GetError returns the value of Error.

func (*ProblemDebug) GetMethod

func (s *ProblemDebug) GetMethod() string

GetMethod returns the value of Method.

func (*ProblemDebug) GetPath

func (s *ProblemDebug) GetPath() string

GetPath returns the value of Path.

func (*ProblemDebug) GetRequestId

func (s *ProblemDebug) GetRequestId() OptString

GetRequestId returns the value of RequestId.

func (*ProblemDebug) GetStack

func (s *ProblemDebug) GetStack() OptString

GetStack returns the value of Stack.

func (*ProblemDebug) MarshalJSON

func (s *ProblemDebug) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProblemDebug) SetError

func (s *ProblemDebug) SetError(val string)

SetError sets the value of Error.

func (*ProblemDebug) SetMethod

func (s *ProblemDebug) SetMethod(val string)

SetMethod sets the value of Method.

func (*ProblemDebug) SetPath

func (s *ProblemDebug) SetPath(val string)

SetPath sets the value of Path.

func (*ProblemDebug) SetRequestId

func (s *ProblemDebug) SetRequestId(val OptString)

SetRequestId sets the value of RequestId.

func (*ProblemDebug) SetStack

func (s *ProblemDebug) SetStack(val OptString)

SetStack sets the value of Stack.

func (*ProblemDebug) UnmarshalJSON

func (s *ProblemDebug) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ProblemDetails

type ProblemDetails struct {
	// Why the request was refused, when the client should act on it.
	Code OptProblemCode `json:"code"`
	// A URI reference that identifies the problem type.
	Type OptString `json:"type"`
	// A short, human-readable summary of the problem type.
	Title OptString `json:"title"`
	// HTTP status code.
	Status OptInt32 `json:"status"`
	// A human-readable explanation specific to this occurrence.
	Detail OptString `json:"detail"`
	// A URI reference that identifies the specific occurrence.
	Instance OptString `json:"instance"`
	// Validation errors grouped by field.
	Errors OptProblemDetailsErrors `json:"errors"`
	// Form-level validation error.
	Form OptString `json:"form"`
	// Field validation errors.
	Fields OptProblemDetailsFields `json:"fields"`
	// Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait.
	RetryAfter OptInt32 `json:"retryAfter"`
	// Why a 500 happened, sent only by a development server (`SPHERICON_ENV=development`).
	Debug OptProblemDebug `json:"debug"`
}

RFC 7807 Problem Details. Ref: #/components/schemas/ProblemDetails

func (*ProblemDetails) Decode

func (s *ProblemDetails) Decode(d *jx.Decoder) error

Decode decodes ProblemDetails from json.

func (*ProblemDetails) Encode

func (s *ProblemDetails) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProblemDetails) GetCode

func (s *ProblemDetails) GetCode() OptProblemCode

GetCode returns the value of Code.

func (*ProblemDetails) GetDebug

func (s *ProblemDetails) GetDebug() OptProblemDebug

GetDebug returns the value of Debug.

func (*ProblemDetails) GetDetail

func (s *ProblemDetails) GetDetail() OptString

GetDetail returns the value of Detail.

func (*ProblemDetails) GetErrors

func (s *ProblemDetails) GetErrors() OptProblemDetailsErrors

GetErrors returns the value of Errors.

func (*ProblemDetails) GetFields

func (s *ProblemDetails) GetFields() OptProblemDetailsFields

GetFields returns the value of Fields.

func (*ProblemDetails) GetForm

func (s *ProblemDetails) GetForm() OptString

GetForm returns the value of Form.

func (*ProblemDetails) GetInstance

func (s *ProblemDetails) GetInstance() OptString

GetInstance returns the value of Instance.

func (*ProblemDetails) GetRetryAfter

func (s *ProblemDetails) GetRetryAfter() OptInt32

GetRetryAfter returns the value of RetryAfter.

func (*ProblemDetails) GetStatus

func (s *ProblemDetails) GetStatus() OptInt32

GetStatus returns the value of Status.

func (*ProblemDetails) GetTitle

func (s *ProblemDetails) GetTitle() OptString

GetTitle returns the value of Title.

func (*ProblemDetails) GetType

func (s *ProblemDetails) GetType() OptString

GetType returns the value of Type.

func (*ProblemDetails) MarshalJSON

func (s *ProblemDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProblemDetails) SetCode

func (s *ProblemDetails) SetCode(val OptProblemCode)

SetCode sets the value of Code.

func (*ProblemDetails) SetDebug

func (s *ProblemDetails) SetDebug(val OptProblemDebug)

SetDebug sets the value of Debug.

func (*ProblemDetails) SetDetail

func (s *ProblemDetails) SetDetail(val OptString)

SetDetail sets the value of Detail.

func (*ProblemDetails) SetErrors

func (s *ProblemDetails) SetErrors(val OptProblemDetailsErrors)

SetErrors sets the value of Errors.

func (*ProblemDetails) SetFields

func (s *ProblemDetails) SetFields(val OptProblemDetailsFields)

SetFields sets the value of Fields.

func (*ProblemDetails) SetForm

func (s *ProblemDetails) SetForm(val OptString)

SetForm sets the value of Form.

func (*ProblemDetails) SetInstance

func (s *ProblemDetails) SetInstance(val OptString)

SetInstance sets the value of Instance.

func (*ProblemDetails) SetRetryAfter

func (s *ProblemDetails) SetRetryAfter(val OptInt32)

SetRetryAfter sets the value of RetryAfter.

func (*ProblemDetails) SetStatus

func (s *ProblemDetails) SetStatus(val OptInt32)

SetStatus sets the value of Status.

func (*ProblemDetails) SetTitle

func (s *ProblemDetails) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*ProblemDetails) SetType

func (s *ProblemDetails) SetType(val OptString)

SetType sets the value of Type.

func (*ProblemDetails) UnmarshalJSON

func (s *ProblemDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ProblemDetails) Validate

func (s *ProblemDetails) Validate() error

type ProblemDetailsErrors

type ProblemDetailsErrors map[string][]string

Validation errors grouped by field.

func (*ProblemDetailsErrors) Decode

func (s *ProblemDetailsErrors) Decode(d *jx.Decoder) error

Decode decodes ProblemDetailsErrors from json.

func (ProblemDetailsErrors) Encode

func (s ProblemDetailsErrors) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ProblemDetailsErrors) MarshalJSON

func (s ProblemDetailsErrors) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProblemDetailsErrors) UnmarshalJSON

func (s *ProblemDetailsErrors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ProblemDetailsErrors) Validate

func (s ProblemDetailsErrors) Validate() error

type ProblemDetailsFields

type ProblemDetailsFields map[string]string

Field validation errors.

func (*ProblemDetailsFields) Decode

func (s *ProblemDetailsFields) Decode(d *jx.Decoder) error

Decode decodes ProblemDetailsFields from json.

func (ProblemDetailsFields) Encode

func (s ProblemDetailsFields) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ProblemDetailsFields) MarshalJSON

func (s ProblemDetailsFields) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProblemDetailsFields) UnmarshalJSON

func (s *ProblemDetailsFields) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ProblemDetailsHeaders

type ProblemDetailsHeaders struct {
	RetryAfter          int32
	XRateLimitLimit     int32
	XRateLimitRemaining int32
	XRateLimitReset     int64
	Response            ProblemDetails
}

ProblemDetailsHeaders wraps ProblemDetails with response headers.

func (*ProblemDetailsHeaders) GetResponse

func (s *ProblemDetailsHeaders) GetResponse() ProblemDetails

GetResponse returns the value of Response.

func (*ProblemDetailsHeaders) GetRetryAfter

func (s *ProblemDetailsHeaders) GetRetryAfter() int32

GetRetryAfter returns the value of RetryAfter.

func (*ProblemDetailsHeaders) GetXRateLimitLimit

func (s *ProblemDetailsHeaders) GetXRateLimitLimit() int32

GetXRateLimitLimit returns the value of XRateLimitLimit.

func (*ProblemDetailsHeaders) GetXRateLimitRemaining

func (s *ProblemDetailsHeaders) GetXRateLimitRemaining() int32

GetXRateLimitRemaining returns the value of XRateLimitRemaining.

func (*ProblemDetailsHeaders) GetXRateLimitReset

func (s *ProblemDetailsHeaders) GetXRateLimitReset() int64

GetXRateLimitReset returns the value of XRateLimitReset.

func (*ProblemDetailsHeaders) SetResponse

func (s *ProblemDetailsHeaders) SetResponse(val ProblemDetails)

SetResponse sets the value of Response.

func (*ProblemDetailsHeaders) SetRetryAfter

func (s *ProblemDetailsHeaders) SetRetryAfter(val int32)

SetRetryAfter sets the value of RetryAfter.

func (*ProblemDetailsHeaders) SetXRateLimitLimit

func (s *ProblemDetailsHeaders) SetXRateLimitLimit(val int32)

SetXRateLimitLimit sets the value of XRateLimitLimit.

func (*ProblemDetailsHeaders) SetXRateLimitRemaining

func (s *ProblemDetailsHeaders) SetXRateLimitRemaining(val int32)

SetXRateLimitRemaining sets the value of XRateLimitRemaining.

func (*ProblemDetailsHeaders) SetXRateLimitReset

func (s *ProblemDetailsHeaders) SetXRateLimitReset(val int64)

SetXRateLimitReset sets the value of XRateLimitReset.

func (*ProblemDetailsHeaders) Validate

func (s *ProblemDetailsHeaders) Validate() error

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationGroup

func (r Route) OperationGroup() string

OperationGroup returns the x-ogen-operation-group value.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleBearerAuth handles BearerAuth security.
	HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// BearerAuth provides BearerAuth security value.
	BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

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, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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 ServiceHoldsClearNotFound

type ServiceHoldsClearNotFound ProblemDetails

func (*ServiceHoldsClearNotFound) Decode

func (s *ServiceHoldsClearNotFound) Decode(d *jx.Decoder) error

Decode decodes ServiceHoldsClearNotFound from json.

func (*ServiceHoldsClearNotFound) Encode

func (s *ServiceHoldsClearNotFound) Encode(e *jx.Encoder)

Encode encodes ServiceHoldsClearNotFound as json.

func (*ServiceHoldsClearNotFound) MarshalJSON

func (s *ServiceHoldsClearNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsClearNotFound) UnmarshalJSON

func (s *ServiceHoldsClearNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsClearNotFound) Validate

func (s *ServiceHoldsClearNotFound) Validate() error

type ServiceHoldsClearParams

type ServiceHoldsClearParams struct {
	WorkspaceId WorkspaceId
	Key         string
}

ServiceHoldsClearParams is parameters of ServiceHolds_clear operation.

type ServiceHoldsClearRes

type ServiceHoldsClearRes interface {
	// contains filtered or unexported methods
}

type ServiceHoldsClearUnauthorized

type ServiceHoldsClearUnauthorized ProblemDetails

func (*ServiceHoldsClearUnauthorized) Decode

Decode decodes ServiceHoldsClearUnauthorized from json.

func (*ServiceHoldsClearUnauthorized) Encode

Encode encodes ServiceHoldsClearUnauthorized as json.

func (*ServiceHoldsClearUnauthorized) MarshalJSON

func (s *ServiceHoldsClearUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsClearUnauthorized) UnmarshalJSON

func (s *ServiceHoldsClearUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsClearUnauthorized) Validate

func (s *ServiceHoldsClearUnauthorized) Validate() error

type ServiceHoldsListNotFound

type ServiceHoldsListNotFound ProblemDetails

func (*ServiceHoldsListNotFound) Decode

func (s *ServiceHoldsListNotFound) Decode(d *jx.Decoder) error

Decode decodes ServiceHoldsListNotFound from json.

func (*ServiceHoldsListNotFound) Encode

func (s *ServiceHoldsListNotFound) Encode(e *jx.Encoder)

Encode encodes ServiceHoldsListNotFound as json.

func (*ServiceHoldsListNotFound) MarshalJSON

func (s *ServiceHoldsListNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsListNotFound) UnmarshalJSON

func (s *ServiceHoldsListNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsListNotFound) Validate

func (s *ServiceHoldsListNotFound) Validate() error

type ServiceHoldsListParams

type ServiceHoldsListParams struct {
	WorkspaceId WorkspaceId
}

ServiceHoldsListParams is parameters of ServiceHolds_list operation.

type ServiceHoldsListRes

type ServiceHoldsListRes interface {
	// contains filtered or unexported methods
}

type ServiceHoldsListUnauthorized

type ServiceHoldsListUnauthorized ProblemDetails

func (*ServiceHoldsListUnauthorized) Decode

Decode decodes ServiceHoldsListUnauthorized from json.

func (*ServiceHoldsListUnauthorized) Encode

func (s *ServiceHoldsListUnauthorized) Encode(e *jx.Encoder)

Encode encodes ServiceHoldsListUnauthorized as json.

func (*ServiceHoldsListUnauthorized) MarshalJSON

func (s *ServiceHoldsListUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsListUnauthorized) UnmarshalJSON

func (s *ServiceHoldsListUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsListUnauthorized) Validate

func (s *ServiceHoldsListUnauthorized) Validate() error

type ServiceHoldsSetNotFound

type ServiceHoldsSetNotFound ProblemDetails

func (*ServiceHoldsSetNotFound) Decode

func (s *ServiceHoldsSetNotFound) Decode(d *jx.Decoder) error

Decode decodes ServiceHoldsSetNotFound from json.

func (*ServiceHoldsSetNotFound) Encode

func (s *ServiceHoldsSetNotFound) Encode(e *jx.Encoder)

Encode encodes ServiceHoldsSetNotFound as json.

func (*ServiceHoldsSetNotFound) MarshalJSON

func (s *ServiceHoldsSetNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsSetNotFound) UnmarshalJSON

func (s *ServiceHoldsSetNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsSetNotFound) Validate

func (s *ServiceHoldsSetNotFound) Validate() error

type ServiceHoldsSetParams

type ServiceHoldsSetParams struct {
	WorkspaceId WorkspaceId
	Key         string
}

ServiceHoldsSetParams is parameters of ServiceHolds_set operation.

type ServiceHoldsSetRes

type ServiceHoldsSetRes interface {
	// contains filtered or unexported methods
}

type ServiceHoldsSetUnauthorized

type ServiceHoldsSetUnauthorized ProblemDetails

func (*ServiceHoldsSetUnauthorized) Decode

Decode decodes ServiceHoldsSetUnauthorized from json.

func (*ServiceHoldsSetUnauthorized) Encode

func (s *ServiceHoldsSetUnauthorized) Encode(e *jx.Encoder)

Encode encodes ServiceHoldsSetUnauthorized as json.

func (*ServiceHoldsSetUnauthorized) MarshalJSON

func (s *ServiceHoldsSetUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsSetUnauthorized) UnmarshalJSON

func (s *ServiceHoldsSetUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsSetUnauthorized) Validate

func (s *ServiceHoldsSetUnauthorized) Validate() error

type ServiceHoldsSetUnprocessableEntity

type ServiceHoldsSetUnprocessableEntity ProblemDetails

func (*ServiceHoldsSetUnprocessableEntity) Decode

Decode decodes ServiceHoldsSetUnprocessableEntity from json.

func (*ServiceHoldsSetUnprocessableEntity) Encode

Encode encodes ServiceHoldsSetUnprocessableEntity as json.

func (*ServiceHoldsSetUnprocessableEntity) MarshalJSON

func (s *ServiceHoldsSetUnprocessableEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceHoldsSetUnprocessableEntity) UnmarshalJSON

func (s *ServiceHoldsSetUnprocessableEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceHoldsSetUnprocessableEntity) Validate

type ServiceIdentityGetRes

type ServiceIdentityGetRes interface {
	// contains filtered or unexported methods
}

type ServiceIdentityResource

type ServiceIdentityResource struct {
	// The service's name, as recorded in the Audit log.
	Name string `json:"name"`
	// The scopes the credential carries.
	Scopes []ServiceScope `json:"scopes"`
	// When the credential stops working; absent when it never expires.
	ExpiresAt OptNilTimestamp `json:"expiresAt"`
}

What a Service credential is: its name, its scopes and its expiry. Ref: #/components/schemas/ServiceIdentityResource

func (*ServiceIdentityResource) Decode

func (s *ServiceIdentityResource) Decode(d *jx.Decoder) error

Decode decodes ServiceIdentityResource from json.

func (*ServiceIdentityResource) Encode

func (s *ServiceIdentityResource) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceIdentityResource) GetExpiresAt

func (s *ServiceIdentityResource) GetExpiresAt() OptNilTimestamp

GetExpiresAt returns the value of ExpiresAt.

func (*ServiceIdentityResource) GetName

func (s *ServiceIdentityResource) GetName() string

GetName returns the value of Name.

func (*ServiceIdentityResource) GetScopes

func (s *ServiceIdentityResource) GetScopes() []ServiceScope

GetScopes returns the value of Scopes.

func (*ServiceIdentityResource) MarshalJSON

func (s *ServiceIdentityResource) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceIdentityResource) SetExpiresAt

func (s *ServiceIdentityResource) SetExpiresAt(val OptNilTimestamp)

SetExpiresAt sets the value of ExpiresAt.

func (*ServiceIdentityResource) SetName

func (s *ServiceIdentityResource) SetName(val string)

SetName sets the value of Name.

func (*ServiceIdentityResource) SetScopes

func (s *ServiceIdentityResource) SetScopes(val []ServiceScope)

SetScopes sets the value of Scopes.

func (*ServiceIdentityResource) UnmarshalJSON

func (s *ServiceIdentityResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceIdentityResource) Validate

func (s *ServiceIdentityResource) Validate() error

type ServiceScope

type ServiceScope string

A scope a Service credential may carry. Ref: #/components/schemas/ServiceScope

const (
	ServiceScopeUsageRead      ServiceScope = "usage:read"
	ServiceScopeWorkspacesRead ServiceScope = "workspaces:read"
	ServiceScopeDomainsRead    ServiceScope = "domains:read"
	ServiceScopeHoldsWrite     ServiceScope = "holds:write"
)

func (ServiceScope) AllValues

func (ServiceScope) AllValues() []ServiceScope

AllValues returns all ServiceScope values.

func (*ServiceScope) Decode

func (s *ServiceScope) Decode(d *jx.Decoder) error

Decode decodes ServiceScope from json.

func (ServiceScope) Encode

func (s ServiceScope) Encode(e *jx.Encoder)

Encode encodes ServiceScope as json.

func (ServiceScope) MarshalJSON

func (s ServiceScope) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ServiceScope) MarshalText

func (s ServiceScope) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ServiceScope) UnmarshalJSON

func (s *ServiceScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceScope) UnmarshalText

func (s *ServiceScope) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ServiceScope) Validate

func (s ServiceScope) Validate() error

type ServiceTrackingHostChange

type ServiceTrackingHostChange struct {
	// The host, `track.<Sending domain>`.
	Host string `json:"host"`
	// The Workspace that held the host at this change.
	WorkspaceId WorkspaceId `json:"workspaceId"`
	// What the host became; `removed` is the explicit report that it left the verified states. Entries of
	// one host arrive in the order they happened, so the last one read is its current state.
	State ServiceTrackingHostState `json:"state"`
	// When the change was recorded.
	ChangedAt Timestamp `json:"changedAt"`
}

One change of a Tracking domain host. Ref: #/components/schemas/ServiceTrackingHostChange

func (*ServiceTrackingHostChange) Decode

func (s *ServiceTrackingHostChange) Decode(d *jx.Decoder) error

Decode decodes ServiceTrackingHostChange from json.

func (*ServiceTrackingHostChange) Encode

func (s *ServiceTrackingHostChange) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceTrackingHostChange) GetChangedAt

func (s *ServiceTrackingHostChange) GetChangedAt() Timestamp

GetChangedAt returns the value of ChangedAt.

func (*ServiceTrackingHostChange) GetHost

func (s *ServiceTrackingHostChange) GetHost() string

GetHost returns the value of Host.

func (*ServiceTrackingHostChange) GetState

GetState returns the value of State.

func (*ServiceTrackingHostChange) GetWorkspaceId

func (s *ServiceTrackingHostChange) GetWorkspaceId() WorkspaceId

GetWorkspaceId returns the value of WorkspaceId.

func (*ServiceTrackingHostChange) MarshalJSON

func (s *ServiceTrackingHostChange) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceTrackingHostChange) SetChangedAt

func (s *ServiceTrackingHostChange) SetChangedAt(val Timestamp)

SetChangedAt sets the value of ChangedAt.

func (*ServiceTrackingHostChange) SetHost

func (s *ServiceTrackingHostChange) SetHost(val string)

SetHost sets the value of Host.

func (*ServiceTrackingHostChange) SetState

SetState sets the value of State.

func (*ServiceTrackingHostChange) SetWorkspaceId

func (s *ServiceTrackingHostChange) SetWorkspaceId(val WorkspaceId)

SetWorkspaceId sets the value of WorkspaceId.

func (*ServiceTrackingHostChange) UnmarshalJSON

func (s *ServiceTrackingHostChange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostChange) Validate

func (s *ServiceTrackingHostChange) Validate() error

type ServiceTrackingHostFeedListBadRequest

type ServiceTrackingHostFeedListBadRequest ProblemDetails

func (*ServiceTrackingHostFeedListBadRequest) Decode

Decode decodes ServiceTrackingHostFeedListBadRequest from json.

func (*ServiceTrackingHostFeedListBadRequest) Encode

Encode encodes ServiceTrackingHostFeedListBadRequest as json.

func (*ServiceTrackingHostFeedListBadRequest) MarshalJSON

func (s *ServiceTrackingHostFeedListBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceTrackingHostFeedListBadRequest) UnmarshalJSON

func (s *ServiceTrackingHostFeedListBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostFeedListBadRequest) Validate

type ServiceTrackingHostFeedListForbidden

type ServiceTrackingHostFeedListForbidden ProblemDetails

func (*ServiceTrackingHostFeedListForbidden) Decode

Decode decodes ServiceTrackingHostFeedListForbidden from json.

func (*ServiceTrackingHostFeedListForbidden) Encode

Encode encodes ServiceTrackingHostFeedListForbidden as json.

func (*ServiceTrackingHostFeedListForbidden) MarshalJSON

func (s *ServiceTrackingHostFeedListForbidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceTrackingHostFeedListForbidden) UnmarshalJSON

func (s *ServiceTrackingHostFeedListForbidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostFeedListForbidden) Validate

type ServiceTrackingHostFeedListParams

type ServiceTrackingHostFeedListParams struct {
	// The `nextCursor` of a page the caller has saved; empty starts from the beginning.
	Cursor OptString `json:",omitempty,omitzero"`
	// Most entries on the page.
	Limit OptInt32 `json:",omitempty,omitzero"`
}

ServiceTrackingHostFeedListParams is parameters of ServiceTrackingHostFeed_list operation.

type ServiceTrackingHostFeedListRes

type ServiceTrackingHostFeedListRes interface {
	// contains filtered or unexported methods
}

type ServiceTrackingHostFeedListUnauthorized

type ServiceTrackingHostFeedListUnauthorized ProblemDetails

func (*ServiceTrackingHostFeedListUnauthorized) Decode

Decode decodes ServiceTrackingHostFeedListUnauthorized from json.

func (*ServiceTrackingHostFeedListUnauthorized) Encode

Encode encodes ServiceTrackingHostFeedListUnauthorized as json.

func (*ServiceTrackingHostFeedListUnauthorized) MarshalJSON

func (s *ServiceTrackingHostFeedListUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceTrackingHostFeedListUnauthorized) UnmarshalJSON

func (s *ServiceTrackingHostFeedListUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostFeedListUnauthorized) Validate

type ServiceTrackingHostFeedPage

type ServiceTrackingHostFeedPage struct {
	// Changes after the requested cursor, in the order they were made.
	Items []ServiceTrackingHostChange `json:"items"`
	// Pass it back as the cursor to read what follows this page. It is the requested cursor itself when
	// the page is empty. Saving it is what advances the caller: the core keeps no position of its own.
	NextCursor string `json:"nextCursor"`
	// Whether more entries follow this page right now.
	HasMore bool `json:"hasMore"`
}

One page of the Tracking host feed. Ref: #/components/schemas/ServiceTrackingHostFeedPage

func (*ServiceTrackingHostFeedPage) Decode

Decode decodes ServiceTrackingHostFeedPage from json.

func (*ServiceTrackingHostFeedPage) Encode

func (s *ServiceTrackingHostFeedPage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceTrackingHostFeedPage) GetHasMore

func (s *ServiceTrackingHostFeedPage) GetHasMore() bool

GetHasMore returns the value of HasMore.

func (*ServiceTrackingHostFeedPage) GetItems

GetItems returns the value of Items.

func (*ServiceTrackingHostFeedPage) GetNextCursor

func (s *ServiceTrackingHostFeedPage) GetNextCursor() string

GetNextCursor returns the value of NextCursor.

func (*ServiceTrackingHostFeedPage) MarshalJSON

func (s *ServiceTrackingHostFeedPage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceTrackingHostFeedPage) SetHasMore

func (s *ServiceTrackingHostFeedPage) SetHasMore(val bool)

SetHasMore sets the value of HasMore.

func (*ServiceTrackingHostFeedPage) SetItems

SetItems sets the value of Items.

func (*ServiceTrackingHostFeedPage) SetNextCursor

func (s *ServiceTrackingHostFeedPage) SetNextCursor(val string)

SetNextCursor sets the value of NextCursor.

func (*ServiceTrackingHostFeedPage) UnmarshalJSON

func (s *ServiceTrackingHostFeedPage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostFeedPage) Validate

func (s *ServiceTrackingHostFeedPage) Validate() error

type ServiceTrackingHostState

type ServiceTrackingHostState string

What a Tracking domain host did at one change. Ref: #/components/schemas/ServiceTrackingHostState

const (
	ServiceTrackingHostStateDNSVerified ServiceTrackingHostState = "dns_verified"
	ServiceTrackingHostStateServing     ServiceTrackingHostState = "serving"
	ServiceTrackingHostStateRemoved     ServiceTrackingHostState = "removed"
)

func (ServiceTrackingHostState) AllValues

AllValues returns all ServiceTrackingHostState values.

func (*ServiceTrackingHostState) Decode

func (s *ServiceTrackingHostState) Decode(d *jx.Decoder) error

Decode decodes ServiceTrackingHostState from json.

func (ServiceTrackingHostState) Encode

func (s ServiceTrackingHostState) Encode(e *jx.Encoder)

Encode encodes ServiceTrackingHostState as json.

func (ServiceTrackingHostState) MarshalJSON

func (s ServiceTrackingHostState) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ServiceTrackingHostState) MarshalText

func (s ServiceTrackingHostState) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ServiceTrackingHostState) UnmarshalJSON

func (s *ServiceTrackingHostState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceTrackingHostState) UnmarshalText

func (s *ServiceTrackingHostState) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ServiceTrackingHostState) Validate

func (s ServiceTrackingHostState) Validate() error

type ServiceUsageListBadRequest

type ServiceUsageListBadRequest ProblemDetails

func (*ServiceUsageListBadRequest) Decode

Decode decodes ServiceUsageListBadRequest from json.

func (*ServiceUsageListBadRequest) Encode

func (s *ServiceUsageListBadRequest) Encode(e *jx.Encoder)

Encode encodes ServiceUsageListBadRequest as json.

func (*ServiceUsageListBadRequest) MarshalJSON

func (s *ServiceUsageListBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceUsageListBadRequest) UnmarshalJSON

func (s *ServiceUsageListBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceUsageListBadRequest) Validate

func (s *ServiceUsageListBadRequest) Validate() error

type ServiceUsageListForbidden

type ServiceUsageListForbidden ProblemDetails

func (*ServiceUsageListForbidden) Decode

func (s *ServiceUsageListForbidden) Decode(d *jx.Decoder) error

Decode decodes ServiceUsageListForbidden from json.

func (*ServiceUsageListForbidden) Encode

func (s *ServiceUsageListForbidden) Encode(e *jx.Encoder)

Encode encodes ServiceUsageListForbidden as json.

func (*ServiceUsageListForbidden) MarshalJSON

func (s *ServiceUsageListForbidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceUsageListForbidden) UnmarshalJSON

func (s *ServiceUsageListForbidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceUsageListForbidden) Validate

func (s *ServiceUsageListForbidden) Validate() error

type ServiceUsageListOK

type ServiceUsageListOK struct {
	// List of items.
	Items []WorkspaceUsageResource `json:"items"`
	// Page number (1-based).
	Page int32 `json:"page"`
	// Page size.
	PageSize int32 `json:"pageSize"`
	// Total number of elements.
	TotalItems int32 `json:"totalItems"`
	// Total number of pages.
	TotalPages int32 `json:"totalPages"`
}

Paginated response.

func (*ServiceUsageListOK) Decode

func (s *ServiceUsageListOK) Decode(d *jx.Decoder) error

Decode decodes ServiceUsageListOK from json.

func (*ServiceUsageListOK) Encode

func (s *ServiceUsageListOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceUsageListOK) GetItems

GetItems returns the value of Items.

func (*ServiceUsageListOK) GetPage

func (s *ServiceUsageListOK) GetPage() int32

GetPage returns the value of Page.

func (*ServiceUsageListOK) GetPageSize

func (s *ServiceUsageListOK) GetPageSize() int32

GetPageSize returns the value of PageSize.

func (*ServiceUsageListOK) GetTotalItems

func (s *ServiceUsageListOK) GetTotalItems() int32

GetTotalItems returns the value of TotalItems.

func (*ServiceUsageListOK) GetTotalPages

func (s *ServiceUsageListOK) GetTotalPages() int32

GetTotalPages returns the value of TotalPages.

func (*ServiceUsageListOK) MarshalJSON

func (s *ServiceUsageListOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceUsageListOK) SetItems

func (s *ServiceUsageListOK) SetItems(val []WorkspaceUsageResource)

SetItems sets the value of Items.

func (*ServiceUsageListOK) SetPage

func (s *ServiceUsageListOK) SetPage(val int32)

SetPage sets the value of Page.

func (*ServiceUsageListOK) SetPageSize

func (s *ServiceUsageListOK) SetPageSize(val int32)

SetPageSize sets the value of PageSize.

func (*ServiceUsageListOK) SetTotalItems

func (s *ServiceUsageListOK) SetTotalItems(val int32)

SetTotalItems sets the value of TotalItems.

func (*ServiceUsageListOK) SetTotalPages

func (s *ServiceUsageListOK) SetTotalPages(val int32)

SetTotalPages sets the value of TotalPages.

func (*ServiceUsageListOK) UnmarshalJSON

func (s *ServiceUsageListOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceUsageListOK) Validate

func (s *ServiceUsageListOK) Validate() error

type ServiceUsageListParams

type ServiceUsageListParams struct {
	// The Usage period as YYYY-MM (UTC); the current one when absent.
	Period OptString `json:",omitempty,omitzero"`
	// Page number (1-based).
	Page OptInt32 `json:",omitempty,omitzero"`
	// Page size.
	PageSize OptInt32 `json:",omitempty,omitzero"`
}

ServiceUsageListParams is parameters of ServiceUsage_list operation.

type ServiceUsageListRes

type ServiceUsageListRes interface {
	// contains filtered or unexported methods
}

type ServiceUsageListUnauthorized

type ServiceUsageListUnauthorized ProblemDetails

func (*ServiceUsageListUnauthorized) Decode

Decode decodes ServiceUsageListUnauthorized from json.

func (*ServiceUsageListUnauthorized) Encode

func (s *ServiceUsageListUnauthorized) Encode(e *jx.Encoder)

Encode encodes ServiceUsageListUnauthorized as json.

func (*ServiceUsageListUnauthorized) MarshalJSON

func (s *ServiceUsageListUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceUsageListUnauthorized) UnmarshalJSON

func (s *ServiceUsageListUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceUsageListUnauthorized) Validate

func (s *ServiceUsageListUnauthorized) Validate() error

type ServiceWorkspaceFeedListBadRequest

type ServiceWorkspaceFeedListBadRequest ProblemDetails

func (*ServiceWorkspaceFeedListBadRequest) Decode

Decode decodes ServiceWorkspaceFeedListBadRequest from json.

func (*ServiceWorkspaceFeedListBadRequest) Encode

Encode encodes ServiceWorkspaceFeedListBadRequest as json.

func (*ServiceWorkspaceFeedListBadRequest) MarshalJSON

func (s *ServiceWorkspaceFeedListBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceFeedListBadRequest) UnmarshalJSON

func (s *ServiceWorkspaceFeedListBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceFeedListBadRequest) Validate

type ServiceWorkspaceFeedListForbidden

type ServiceWorkspaceFeedListForbidden ProblemDetails

func (*ServiceWorkspaceFeedListForbidden) Decode

Decode decodes ServiceWorkspaceFeedListForbidden from json.

func (*ServiceWorkspaceFeedListForbidden) Encode

Encode encodes ServiceWorkspaceFeedListForbidden as json.

func (*ServiceWorkspaceFeedListForbidden) MarshalJSON

func (s *ServiceWorkspaceFeedListForbidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceFeedListForbidden) UnmarshalJSON

func (s *ServiceWorkspaceFeedListForbidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceFeedListForbidden) Validate

type ServiceWorkspaceFeedListParams

type ServiceWorkspaceFeedListParams struct {
	// The `nextCursor` of a page the caller has saved; empty starts from the beginning.
	Cursor OptString `json:",omitempty,omitzero"`
	// Most entries on the page.
	Limit OptInt32 `json:",omitempty,omitzero"`
}

ServiceWorkspaceFeedListParams is parameters of ServiceWorkspaceFeed_list operation.

type ServiceWorkspaceFeedListRes

type ServiceWorkspaceFeedListRes interface {
	// contains filtered or unexported methods
}

type ServiceWorkspaceFeedListUnauthorized

type ServiceWorkspaceFeedListUnauthorized ProblemDetails

func (*ServiceWorkspaceFeedListUnauthorized) Decode

Decode decodes ServiceWorkspaceFeedListUnauthorized from json.

func (*ServiceWorkspaceFeedListUnauthorized) Encode

Encode encodes ServiceWorkspaceFeedListUnauthorized as json.

func (*ServiceWorkspaceFeedListUnauthorized) MarshalJSON

func (s *ServiceWorkspaceFeedListUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceFeedListUnauthorized) UnmarshalJSON

func (s *ServiceWorkspaceFeedListUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceFeedListUnauthorized) Validate

type ServiceWorkspaceFeedPage

type ServiceWorkspaceFeedPage struct {
	// Workspaces created or changed after the requested cursor, in change order.
	Items []ServiceWorkspaceResource `json:"items"`
	// Pass it back as the cursor to read what follows this page. It is the requested cursor itself when
	// the page is empty. Saving it is what advances the caller: the core keeps no position of its own.
	NextCursor string `json:"nextCursor"`
	// Whether more entries follow this page right now.
	HasMore bool `json:"hasMore"`
}

One page of the Workspace feed. Ref: #/components/schemas/ServiceWorkspaceFeedPage

func (*ServiceWorkspaceFeedPage) Decode

func (s *ServiceWorkspaceFeedPage) Decode(d *jx.Decoder) error

Decode decodes ServiceWorkspaceFeedPage from json.

func (*ServiceWorkspaceFeedPage) Encode

func (s *ServiceWorkspaceFeedPage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceWorkspaceFeedPage) GetHasMore

func (s *ServiceWorkspaceFeedPage) GetHasMore() bool

GetHasMore returns the value of HasMore.

func (*ServiceWorkspaceFeedPage) GetItems

GetItems returns the value of Items.

func (*ServiceWorkspaceFeedPage) GetNextCursor

func (s *ServiceWorkspaceFeedPage) GetNextCursor() string

GetNextCursor returns the value of NextCursor.

func (*ServiceWorkspaceFeedPage) MarshalJSON

func (s *ServiceWorkspaceFeedPage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceFeedPage) SetHasMore

func (s *ServiceWorkspaceFeedPage) SetHasMore(val bool)

SetHasMore sets the value of HasMore.

func (*ServiceWorkspaceFeedPage) SetItems

SetItems sets the value of Items.

func (*ServiceWorkspaceFeedPage) SetNextCursor

func (s *ServiceWorkspaceFeedPage) SetNextCursor(val string)

SetNextCursor sets the value of NextCursor.

func (*ServiceWorkspaceFeedPage) UnmarshalJSON

func (s *ServiceWorkspaceFeedPage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceFeedPage) Validate

func (s *ServiceWorkspaceFeedPage) Validate() error

type ServiceWorkspaceOwner

type ServiceWorkspaceOwner struct {
	// The owner's User id.
	UserId EntityId `json:"userId"`
	// The owner's current email.
	Email EmailAddress `json:"email"`
	// When the owner confirmed their email; absent while it is unverified.
	EmailVerifiedAt OptNilTimestamp `json:"emailVerifiedAt"`
}

One owner of a Workspace in the feed. Ref: #/components/schemas/ServiceWorkspaceOwner

func (*ServiceWorkspaceOwner) Decode

func (s *ServiceWorkspaceOwner) Decode(d *jx.Decoder) error

Decode decodes ServiceWorkspaceOwner from json.

func (*ServiceWorkspaceOwner) Encode

func (s *ServiceWorkspaceOwner) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceWorkspaceOwner) GetEmail

func (s *ServiceWorkspaceOwner) GetEmail() EmailAddress

GetEmail returns the value of Email.

func (*ServiceWorkspaceOwner) GetEmailVerifiedAt

func (s *ServiceWorkspaceOwner) GetEmailVerifiedAt() OptNilTimestamp

GetEmailVerifiedAt returns the value of EmailVerifiedAt.

func (*ServiceWorkspaceOwner) GetUserId

func (s *ServiceWorkspaceOwner) GetUserId() EntityId

GetUserId returns the value of UserId.

func (*ServiceWorkspaceOwner) MarshalJSON

func (s *ServiceWorkspaceOwner) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceOwner) SetEmail

func (s *ServiceWorkspaceOwner) SetEmail(val EmailAddress)

SetEmail sets the value of Email.

func (*ServiceWorkspaceOwner) SetEmailVerifiedAt

func (s *ServiceWorkspaceOwner) SetEmailVerifiedAt(val OptNilTimestamp)

SetEmailVerifiedAt sets the value of EmailVerifiedAt.

func (*ServiceWorkspaceOwner) SetUserId

func (s *ServiceWorkspaceOwner) SetUserId(val EntityId)

SetUserId sets the value of UserId.

func (*ServiceWorkspaceOwner) UnmarshalJSON

func (s *ServiceWorkspaceOwner) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceOwner) Validate

func (s *ServiceWorkspaceOwner) Validate() error

type ServiceWorkspaceResource

type ServiceWorkspaceResource struct {
	// The Workspace id: its short opaque public address (ADR 0043).
	ID   WorkspaceId `json:"id"`
	Name string      `json:"name"`
	// When the Workspace was created.
	CreatedAt Timestamp `json:"createdAt"`
	// When the Workspace was deleted; absent while it is live or after a restore. Its 30-day window runs
	// from here.
	DiscardedAt OptNilTimestamp `json:"discardedAt"`
	// When the erasure job removed the Workspace's data; absent until then. An erased Workspace stays in
	// the feed as a tombstone: its name is blank and it has no owners.
	ErasedAt OptNilTimestamp `json:"erasedAt"`
	// Every owner of the Workspace as of this entry.
	Owners []ServiceWorkspaceOwner `json:"owners"`
}

A Workspace with all of its owners, as the feed reports it. Ref: #/components/schemas/ServiceWorkspaceResource

func (*ServiceWorkspaceResource) Decode

func (s *ServiceWorkspaceResource) Decode(d *jx.Decoder) error

Decode decodes ServiceWorkspaceResource from json.

func (*ServiceWorkspaceResource) Encode

func (s *ServiceWorkspaceResource) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceWorkspaceResource) GetCreatedAt

func (s *ServiceWorkspaceResource) GetCreatedAt() Timestamp

GetCreatedAt returns the value of CreatedAt.

func (*ServiceWorkspaceResource) GetDiscardedAt

func (s *ServiceWorkspaceResource) GetDiscardedAt() OptNilTimestamp

GetDiscardedAt returns the value of DiscardedAt.

func (*ServiceWorkspaceResource) GetErasedAt

func (s *ServiceWorkspaceResource) GetErasedAt() OptNilTimestamp

GetErasedAt returns the value of ErasedAt.

func (*ServiceWorkspaceResource) GetID

GetID returns the value of ID.

func (*ServiceWorkspaceResource) GetName

func (s *ServiceWorkspaceResource) GetName() string

GetName returns the value of Name.

func (*ServiceWorkspaceResource) GetOwners

GetOwners returns the value of Owners.

func (*ServiceWorkspaceResource) MarshalJSON

func (s *ServiceWorkspaceResource) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceResource) SetCreatedAt

func (s *ServiceWorkspaceResource) SetCreatedAt(val Timestamp)

SetCreatedAt sets the value of CreatedAt.

func (*ServiceWorkspaceResource) SetDiscardedAt

func (s *ServiceWorkspaceResource) SetDiscardedAt(val OptNilTimestamp)

SetDiscardedAt sets the value of DiscardedAt.

func (*ServiceWorkspaceResource) SetErasedAt

func (s *ServiceWorkspaceResource) SetErasedAt(val OptNilTimestamp)

SetErasedAt sets the value of ErasedAt.

func (*ServiceWorkspaceResource) SetID

func (s *ServiceWorkspaceResource) SetID(val WorkspaceId)

SetID sets the value of ID.

func (*ServiceWorkspaceResource) SetName

func (s *ServiceWorkspaceResource) SetName(val string)

SetName sets the value of Name.

func (*ServiceWorkspaceResource) SetOwners

func (s *ServiceWorkspaceResource) SetOwners(val []ServiceWorkspaceOwner)

SetOwners sets the value of Owners.

func (*ServiceWorkspaceResource) UnmarshalJSON

func (s *ServiceWorkspaceResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceResource) Validate

func (s *ServiceWorkspaceResource) Validate() error

type ServiceWorkspaceUsageGetBadRequest

type ServiceWorkspaceUsageGetBadRequest ProblemDetails

func (*ServiceWorkspaceUsageGetBadRequest) Decode

Decode decodes ServiceWorkspaceUsageGetBadRequest from json.

func (*ServiceWorkspaceUsageGetBadRequest) Encode

Encode encodes ServiceWorkspaceUsageGetBadRequest as json.

func (*ServiceWorkspaceUsageGetBadRequest) MarshalJSON

func (s *ServiceWorkspaceUsageGetBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceUsageGetBadRequest) UnmarshalJSON

func (s *ServiceWorkspaceUsageGetBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceUsageGetBadRequest) Validate

type ServiceWorkspaceUsageGetForbidden

type ServiceWorkspaceUsageGetForbidden ProblemDetails

func (*ServiceWorkspaceUsageGetForbidden) Decode

Decode decodes ServiceWorkspaceUsageGetForbidden from json.

func (*ServiceWorkspaceUsageGetForbidden) Encode

Encode encodes ServiceWorkspaceUsageGetForbidden as json.

func (*ServiceWorkspaceUsageGetForbidden) MarshalJSON

func (s *ServiceWorkspaceUsageGetForbidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceUsageGetForbidden) UnmarshalJSON

func (s *ServiceWorkspaceUsageGetForbidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceUsageGetForbidden) Validate

type ServiceWorkspaceUsageGetNotFound

type ServiceWorkspaceUsageGetNotFound ProblemDetails

func (*ServiceWorkspaceUsageGetNotFound) Decode

Decode decodes ServiceWorkspaceUsageGetNotFound from json.

func (*ServiceWorkspaceUsageGetNotFound) Encode

Encode encodes ServiceWorkspaceUsageGetNotFound as json.

func (*ServiceWorkspaceUsageGetNotFound) MarshalJSON

func (s *ServiceWorkspaceUsageGetNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceUsageGetNotFound) UnmarshalJSON

func (s *ServiceWorkspaceUsageGetNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceUsageGetNotFound) Validate

type ServiceWorkspaceUsageGetParams

type ServiceWorkspaceUsageGetParams struct {
	WorkspaceId WorkspaceId
	// The Usage period as YYYY-MM (UTC); the current one when absent.
	Period OptString `json:",omitempty,omitzero"`
}

ServiceWorkspaceUsageGetParams is parameters of ServiceWorkspaceUsage_get operation.

type ServiceWorkspaceUsageGetRes

type ServiceWorkspaceUsageGetRes interface {
	// contains filtered or unexported methods
}

type ServiceWorkspaceUsageGetUnauthorized

type ServiceWorkspaceUsageGetUnauthorized ProblemDetails

func (*ServiceWorkspaceUsageGetUnauthorized) Decode

Decode decodes ServiceWorkspaceUsageGetUnauthorized from json.

func (*ServiceWorkspaceUsageGetUnauthorized) Encode

Encode encodes ServiceWorkspaceUsageGetUnauthorized as json.

func (*ServiceWorkspaceUsageGetUnauthorized) MarshalJSON

func (s *ServiceWorkspaceUsageGetUnauthorized) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceWorkspaceUsageGetUnauthorized) UnmarshalJSON

func (s *ServiceWorkspaceUsageGetUnauthorized) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ServiceWorkspaceUsageGetUnauthorized) Validate

type Timestamp

type Timestamp time.Time

func (*Timestamp) Decode

func (s *Timestamp) Decode(d *jx.Decoder) error

Decode decodes Timestamp from json.

func (Timestamp) Encode

func (s Timestamp) Encode(e *jx.Encoder)

Encode encodes Timestamp as json.

func (Timestamp) MarshalJSON

func (s Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Timestamp) UnmarshalJSON

func (s *Timestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) ServiceHoldsClear

ServiceHoldsClear implements ServiceHolds_clear operation.

Clear a hold by its key. Idempotent: clearing a missing hold succeeds with `changed` false.

DELETE /workspaces/{workspaceId}/holds/{key}

func (UnimplementedHandler) ServiceHoldsList

ServiceHoldsList implements ServiceHolds_list operation.

The holds of a Workspace that are active now; a lapsed one is not listed.

GET /workspaces/{workspaceId}/holds

func (UnimplementedHandler) ServiceHoldsSet

ServiceHoldsSet implements ServiceHolds_set operation.

Set a hold under a key, or renew it by setting it again with a later expiry. Idempotent: setting the same hold twice changes nothing and says so (`changed` false); renewing with a different expiry is a change.

PUT /workspaces/{workspaceId}/holds/{key}

func (UnimplementedHandler) ServiceIdentityGet

func (UnimplementedHandler) ServiceIdentityGet(ctx context.Context) (r ServiceIdentityGetRes, _ error)

ServiceIdentityGet implements ServiceIdentity_get operation.

The calling credential's own name, scopes and expiry.

GET /identity

func (UnimplementedHandler) ServiceTrackingHostFeedList

ServiceTrackingHostFeedList implements ServiceTrackingHostFeed_list operation.

The changes of Tracking domain hosts since an opaque cursor, in the order they were made: a host entering `dns_verified` or `serving`, moving between them, or leaving them, which is reported as `removed` and never as silence. A caller that applies each entry in order (provision on `dns_verified` and `serving`, tear down on `removed`) mirrors the Instance's verified hosts, and a caller that starts from an empty cursor rebuilds the whole set. Delivery is at-least-once: replaying a cursor returns the same entries, so applying one twice must change nothing.

GET /domains/changes

func (UnimplementedHandler) ServiceUsageList

ServiceUsageList implements ServiceUsage_list operation.

The figures of every Workspace for a Usage period, by Workspace id: Live usage for the open period, Usage snapshots for a closed one. Never a recount on read.

GET /usage

func (UnimplementedHandler) ServiceWorkspaceFeedList

ServiceWorkspaceFeedList implements ServiceWorkspaceFeed_list operation.

The Workspaces created or changed since an opaque cursor, each with all of its owners, in a stable order by change position. A change is a new Workspace, an owner added, removed or transferred, or an owner's email or verification changing. Delivery is at-least-once: replaying a cursor returns the same entries, and an empty cursor starts from the beginning.

GET /workspaces/changes

func (UnimplementedHandler) ServiceWorkspaceUsageGet

ServiceWorkspaceUsageGet implements ServiceWorkspaceUsage_get operation.

The figures of one Workspace for a Usage period: Live usage (not final, with the in-flight sends as their own figure) for the open period, Usage snapshots (final) for a closed one. Never a recount on read.

GET /workspaces/{workspaceId}/usage

type UsageFigure

type UsageFigure struct {
	Metric UsageMetric `json:"metric"`
	// The value of the metric over the period.
	Value int64 `json:"value"`
	// True once the Usage period closed: the figure is a Usage snapshot and never changes. False while it
	// is Live usage.
	Final bool `json:"final"`
	// When the figure was last computed.
	ComputedAt Timestamp `json:"computedAt"`
}

One metric's figure for a Workspace over a Usage period. Ref: #/components/schemas/UsageFigure

func (*UsageFigure) Decode

func (s *UsageFigure) Decode(d *jx.Decoder) error

Decode decodes UsageFigure from json.

func (*UsageFigure) Encode

func (s *UsageFigure) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UsageFigure) GetComputedAt

func (s *UsageFigure) GetComputedAt() Timestamp

GetComputedAt returns the value of ComputedAt.

func (*UsageFigure) GetFinal

func (s *UsageFigure) GetFinal() bool

GetFinal returns the value of Final.

func (*UsageFigure) GetMetric

func (s *UsageFigure) GetMetric() UsageMetric

GetMetric returns the value of Metric.

func (*UsageFigure) GetValue

func (s *UsageFigure) GetValue() int64

GetValue returns the value of Value.

func (*UsageFigure) MarshalJSON

func (s *UsageFigure) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UsageFigure) SetComputedAt

func (s *UsageFigure) SetComputedAt(val Timestamp)

SetComputedAt sets the value of ComputedAt.

func (*UsageFigure) SetFinal

func (s *UsageFigure) SetFinal(val bool)

SetFinal sets the value of Final.

func (*UsageFigure) SetMetric

func (s *UsageFigure) SetMetric(val UsageMetric)

SetMetric sets the value of Metric.

func (*UsageFigure) SetValue

func (s *UsageFigure) SetValue(val int64)

SetValue sets the value of Value.

func (*UsageFigure) UnmarshalJSON

func (s *UsageFigure) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UsageFigure) Validate

func (s *UsageFigure) Validate() error

type UsageMetric

type UsageMetric string

A metric of Usage. Ref: #/components/schemas/UsageMetric

const (
	UsageMetricEmailsSent    UsageMetric = "emails_sent"
	UsageMetricInFlightSends UsageMetric = "in_flight_sends"
	UsageMetricContacts      UsageMetric = "contacts"
)

func (UsageMetric) AllValues

func (UsageMetric) AllValues() []UsageMetric

AllValues returns all UsageMetric values.

func (*UsageMetric) Decode

func (s *UsageMetric) Decode(d *jx.Decoder) error

Decode decodes UsageMetric from json.

func (UsageMetric) Encode

func (s UsageMetric) Encode(e *jx.Encoder)

Encode encodes UsageMetric as json.

func (UsageMetric) MarshalJSON

func (s UsageMetric) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (UsageMetric) MarshalText

func (s UsageMetric) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*UsageMetric) UnmarshalJSON

func (s *UsageMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UsageMetric) UnmarshalText

func (s *UsageMetric) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (UsageMetric) Validate

func (s UsageMetric) Validate() error

type WorkspaceId

type WorkspaceId string

func (*WorkspaceId) Decode

func (s *WorkspaceId) Decode(d *jx.Decoder) error

Decode decodes WorkspaceId from json.

func (WorkspaceId) Encode

func (s WorkspaceId) Encode(e *jx.Encoder)

Encode encodes WorkspaceId as json.

func (WorkspaceId) MarshalJSON

func (s WorkspaceId) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WorkspaceId) UnmarshalJSON

func (s *WorkspaceId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (WorkspaceId) Validate

func (s WorkspaceId) Validate() error

type WorkspaceUsageResource

type WorkspaceUsageResource struct {
	// The Workspace.
	WorkspaceId WorkspaceId `json:"workspaceId"`
	// The Usage period: the calendar month in UTC, as YYYY-MM.
	Period string `json:"period"`
	// One figure per metric.
	Figures []UsageFigure `json:"figures"`
}

The figures of one Workspace for one Usage period. Ref: #/components/schemas/WorkspaceUsageResource

func (*WorkspaceUsageResource) Decode

func (s *WorkspaceUsageResource) Decode(d *jx.Decoder) error

Decode decodes WorkspaceUsageResource from json.

func (*WorkspaceUsageResource) Encode

func (s *WorkspaceUsageResource) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WorkspaceUsageResource) GetFigures

func (s *WorkspaceUsageResource) GetFigures() []UsageFigure

GetFigures returns the value of Figures.

func (*WorkspaceUsageResource) GetPeriod

func (s *WorkspaceUsageResource) GetPeriod() string

GetPeriod returns the value of Period.

func (*WorkspaceUsageResource) GetWorkspaceId

func (s *WorkspaceUsageResource) GetWorkspaceId() WorkspaceId

GetWorkspaceId returns the value of WorkspaceId.

func (*WorkspaceUsageResource) MarshalJSON

func (s *WorkspaceUsageResource) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WorkspaceUsageResource) SetFigures

func (s *WorkspaceUsageResource) SetFigures(val []UsageFigure)

SetFigures sets the value of Figures.

func (*WorkspaceUsageResource) SetPeriod

func (s *WorkspaceUsageResource) SetPeriod(val string)

SetPeriod sets the value of Period.

func (*WorkspaceUsageResource) SetWorkspaceId

func (s *WorkspaceUsageResource) SetWorkspaceId(val WorkspaceId)

SetWorkspaceId sets the value of WorkspaceId.

func (*WorkspaceUsageResource) UnmarshalJSON

func (s *WorkspaceUsageResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WorkspaceUsageResource) Validate

func (s *WorkspaceUsageResource) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL