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

staffapi

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 GetRolesForApiKeyAuth

func GetRolesForApiKeyAuth(operation string) []string

GetRolesForApiKeyAuth 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 := GetRolesForApiKeyAuth(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 ApiKeyAuth

type ApiKeyAuth struct {
	APIKey string
	Roles  []string
}

func (*ApiKeyAuth) GetAPIKey

func (s *ApiKeyAuth) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*ApiKeyAuth) GetRoles

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

GetRoles returns the value of Roles.

func (*ApiKeyAuth) SetAPIKey

func (s *ApiKeyAuth) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

func (*ApiKeyAuth) SetRoles

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

SetRoles sets the value of Roles.

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

func (c *Client) StaffAuthLogin(ctx context.Context, request *StaffLoginInput) (StaffAuthLoginRes, error)

StaffAuthLogin invokes StaffAuth_login operation.

Check the password. Answers a challenge (or, at first login, a TOTP enrolment) and never a session. Unknown email and wrong password answer the same 401.

POST /auth/login

func (*Client) StaffAuthLogout

func (c *Client) StaffAuthLogout(ctx context.Context) (StaffAuthLogoutRes, error)

StaffAuthLogout invokes StaffAuth_logout operation.

End the session: bumps the Staff member's session epoch, so every session token of the Staff member (a copied one too) stops verifying, and clears the session cookie.

POST /auth/logout

func (*Client) StaffAuthSecondFactor

func (c *Client) StaffAuthSecondFactor(ctx context.Context, request *StaffSecondFactorInput) (StaffAuthSecondFactorRes, error)

StaffAuthSecondFactor invokes StaffAuth_secondFactor operation.

The second login step: verify the challenge and a TOTP code, then start the session (the cookie is set here). At first login the code also confirms the enrolment. An expired, reused or forged challenge and a wrong code answer the same 401.

POST /auth/second-factor

func (*Client) StaffMeGet

func (c *Client) StaffMeGet(ctx context.Context) (StaffMeGetRes, error)

StaffMeGet invokes StaffMe_get operation.

The authenticated Staff member.

GET /me

func (*Client) StaffSignupSurveyCounts

func (c *Client) StaffSignupSurveyCounts(ctx context.Context) (StaffSignupSurveyCountsRes, error)

StaffSignupSurveyCounts invokes StaffSignupSurvey_counts operation.

The Sign-up survey answers, counted per question. Read only.

GET /signup-survey

func (*Client) StaffSignupSurveyGet

func (c *Client) StaffSignupSurveyGet(ctx context.Context, params StaffSignupSurveyGetParams) (StaffSignupSurveyGetRes, error)

StaffSignupSurveyGet invokes StaffSignupSurvey_get operation.

One User's answers. 404 when the User is unknown or has not answered the survey.

GET /signup-survey/users/{userId}

func (*Client) StaffWorkspaceAuditList

func (c *Client) StaffWorkspaceAuditList(ctx context.Context, params StaffWorkspaceAuditListParams) (StaffWorkspaceAuditListRes, error)

StaffWorkspaceAuditList invokes StaffWorkspaceAudit_list operation.

One Workspace's Audit log, newest first. Empty when the instance has no Audit license, since nothing is then recorded.

GET /workspaces/{workspaceId}/audit-entries

func (*Client) StaffWorkspacesExempt

func (c *Client) StaffWorkspacesExempt(ctx context.Context, params StaffWorkspacesExemptParams) (StaffWorkspacesExemptRes, error)

StaffWorkspacesExempt invokes StaffWorkspaces_exempt operation.

Exempt a Workspace from the abuse detector (ADR 0026): it is neither warned nor frozen automatically, but stays listed with its rates and can still be suspended by hand. Audited. Idempotent.

POST /workspaces/{workspaceId}/exempt

func (*Client) StaffWorkspacesGet

func (c *Client) StaffWorkspacesGet(ctx context.Context, params StaffWorkspacesGetParams) (StaffWorkspacesGetRes, error)

StaffWorkspacesGet invokes StaffWorkspaces_get operation.

One Workspace's metadata, suspension state, rates and send volume.

GET /workspaces/{workspaceId}

func (*Client) StaffWorkspacesList

func (c *Client) StaffWorkspacesList(ctx context.Context, params StaffWorkspacesListParams) (StaffWorkspacesListRes, error)

StaffWorkspacesList invokes StaffWorkspaces_list operation.

List all Workspaces, newest first, optionally narrowed by an id or name search.

GET /workspaces

func (*Client) StaffWorkspacesSuspend

func (c *Client) StaffWorkspacesSuspend(ctx context.Context, request *StaffSuspendInput, params StaffWorkspacesSuspendParams) (StaffWorkspacesSuspendRes, error)

StaffWorkspacesSuspend invokes StaffWorkspaces_suspend operation.

Suspend a Workspace's outbound sending (ADR 0007) with a required reason, as the signed-in Staff member. Idempotent: an already-suspended Workspace is left as it was.

POST /workspaces/{workspaceId}/suspend

func (*Client) StaffWorkspacesUnexempt

func (c *Client) StaffWorkspacesUnexempt(ctx context.Context, params StaffWorkspacesUnexemptParams) (StaffWorkspacesUnexemptRes, error)

StaffWorkspacesUnexempt invokes StaffWorkspaces_unexempt operation.

Police a Workspace by the abuse detector again. Audited. Idempotent.

POST /workspaces/{workspaceId}/unexempt

func (*Client) StaffWorkspacesUnsuspend

func (c *Client) StaffWorkspacesUnsuspend(ctx context.Context, params StaffWorkspacesUnsuspendParams) (StaffWorkspacesUnsuspendRes, error)

StaffWorkspacesUnsuspend invokes StaffWorkspaces_unsuspend operation.

Lift a Workspace's suspension; held sends resume. Idempotent: a Workspace that is not suspended is left as it was.

POST /workspaces/{workspaceId}/unsuspend

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 {
	// StaffAuthLogin implements StaffAuth_login operation.
	//
	// Check the password. Answers a challenge (or, at first login, a TOTP enrolment) and never a session.
	// Unknown email and wrong password answer the same 401.
	//
	// POST /auth/login
	StaffAuthLogin(ctx context.Context, req *StaffLoginInput) (StaffAuthLoginRes, error)
	// StaffAuthLogout implements StaffAuth_logout operation.
	//
	// End the session: bumps the Staff member's session epoch, so every session token of the Staff member
	// (a copied one too) stops verifying, and clears the session cookie.
	//
	// POST /auth/logout
	StaffAuthLogout(ctx context.Context) (StaffAuthLogoutRes, error)
	// StaffAuthSecondFactor implements StaffAuth_secondFactor operation.
	//
	// The second login step: verify the challenge and a TOTP code, then start the session (the cookie is
	// set here). At first login the code also confirms the enrolment. An expired, reused or forged
	// challenge and a wrong code answer the same 401.
	//
	// POST /auth/second-factor
	StaffAuthSecondFactor(ctx context.Context, req *StaffSecondFactorInput) (StaffAuthSecondFactorRes, error)
	// StaffMeGet implements StaffMe_get operation.
	//
	// The authenticated Staff member.
	//
	// GET /me
	StaffMeGet(ctx context.Context) (StaffMeGetRes, error)
	// StaffSignupSurveyCounts implements StaffSignupSurvey_counts operation.
	//
	// The Sign-up survey answers, counted per question. Read only.
	//
	// GET /signup-survey
	StaffSignupSurveyCounts(ctx context.Context) (StaffSignupSurveyCountsRes, error)
	// StaffSignupSurveyGet implements StaffSignupSurvey_get operation.
	//
	// One User's answers. 404 when the User is unknown or has not answered the survey.
	//
	// GET /signup-survey/users/{userId}
	StaffSignupSurveyGet(ctx context.Context, params StaffSignupSurveyGetParams) (StaffSignupSurveyGetRes, error)
	// StaffWorkspaceAuditList implements StaffWorkspaceAudit_list operation.
	//
	// One Workspace's Audit log, newest first. Empty when the instance has no Audit license, since nothing
	// is then recorded.
	//
	// GET /workspaces/{workspaceId}/audit-entries
	StaffWorkspaceAuditList(ctx context.Context, params StaffWorkspaceAuditListParams) (StaffWorkspaceAuditListRes, error)
	// StaffWorkspacesExempt implements StaffWorkspaces_exempt operation.
	//
	// Exempt a Workspace from the abuse detector (ADR 0026): it is neither warned nor frozen
	// automatically, but stays listed with its rates and can still be suspended by hand. Audited.
	// Idempotent.
	//
	// POST /workspaces/{workspaceId}/exempt
	StaffWorkspacesExempt(ctx context.Context, params StaffWorkspacesExemptParams) (StaffWorkspacesExemptRes, error)
	// StaffWorkspacesGet implements StaffWorkspaces_get operation.
	//
	// One Workspace's metadata, suspension state, rates and send volume.
	//
	// GET /workspaces/{workspaceId}
	StaffWorkspacesGet(ctx context.Context, params StaffWorkspacesGetParams) (StaffWorkspacesGetRes, error)
	// StaffWorkspacesList implements StaffWorkspaces_list operation.
	//
	// List all Workspaces, newest first, optionally narrowed by an id or name search.
	//
	// GET /workspaces
	StaffWorkspacesList(ctx context.Context, params StaffWorkspacesListParams) (StaffWorkspacesListRes, error)
	// StaffWorkspacesSuspend implements StaffWorkspaces_suspend operation.
	//
	// Suspend a Workspace's outbound sending (ADR 0007) with a required reason, as the signed-in Staff
	// member. Idempotent: an already-suspended Workspace is left as it was.
	//
	// POST /workspaces/{workspaceId}/suspend
	StaffWorkspacesSuspend(ctx context.Context, req *StaffSuspendInput, params StaffWorkspacesSuspendParams) (StaffWorkspacesSuspendRes, error)
	// StaffWorkspacesUnexempt implements StaffWorkspaces_unexempt operation.
	//
	// Police a Workspace by the abuse detector again. Audited. Idempotent.
	//
	// POST /workspaces/{workspaceId}/unexempt
	StaffWorkspacesUnexempt(ctx context.Context, params StaffWorkspacesUnexemptParams) (StaffWorkspacesUnexemptRes, error)
	// StaffWorkspacesUnsuspend implements StaffWorkspaces_unsuspend operation.
	//
	// Lift a Workspace's suspension; held sends resume. Idempotent: a Workspace that is not suspended is
	// left as it was.
	//
	// POST /workspaces/{workspaceId}/unsuspend
	StaffWorkspacesUnsuspend(ctx context.Context, params StaffWorkspacesUnsuspendParams) (StaffWorkspacesUnsuspendRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// StaffAuthLogin invokes StaffAuth_login operation.
	//
	// Check the password. Answers a challenge (or, at first login, a TOTP enrolment) and never a session.
	// Unknown email and wrong password answer the same 401.
	//
	// POST /auth/login
	StaffAuthLogin(ctx context.Context, request *StaffLoginInput) (StaffAuthLoginRes, error)
	// StaffAuthLogout invokes StaffAuth_logout operation.
	//
	// End the session: bumps the Staff member's session epoch, so every session token of the Staff member
	// (a copied one too) stops verifying, and clears the session cookie.
	//
	// POST /auth/logout
	StaffAuthLogout(ctx context.Context) (StaffAuthLogoutRes, error)
	// StaffAuthSecondFactor invokes StaffAuth_secondFactor operation.
	//
	// The second login step: verify the challenge and a TOTP code, then start the session (the cookie is
	// set here). At first login the code also confirms the enrolment. An expired, reused or forged
	// challenge and a wrong code answer the same 401.
	//
	// POST /auth/second-factor
	StaffAuthSecondFactor(ctx context.Context, request *StaffSecondFactorInput) (StaffAuthSecondFactorRes, error)
	// StaffMeGet invokes StaffMe_get operation.
	//
	// The authenticated Staff member.
	//
	// GET /me
	StaffMeGet(ctx context.Context) (StaffMeGetRes, error)
	// StaffSignupSurveyCounts invokes StaffSignupSurvey_counts operation.
	//
	// The Sign-up survey answers, counted per question. Read only.
	//
	// GET /signup-survey
	StaffSignupSurveyCounts(ctx context.Context) (StaffSignupSurveyCountsRes, error)
	// StaffSignupSurveyGet invokes StaffSignupSurvey_get operation.
	//
	// One User's answers. 404 when the User is unknown or has not answered the survey.
	//
	// GET /signup-survey/users/{userId}
	StaffSignupSurveyGet(ctx context.Context, params StaffSignupSurveyGetParams) (StaffSignupSurveyGetRes, error)
	// StaffWorkspaceAuditList invokes StaffWorkspaceAudit_list operation.
	//
	// One Workspace's Audit log, newest first. Empty when the instance has no Audit license, since nothing
	// is then recorded.
	//
	// GET /workspaces/{workspaceId}/audit-entries
	StaffWorkspaceAuditList(ctx context.Context, params StaffWorkspaceAuditListParams) (StaffWorkspaceAuditListRes, error)
	// StaffWorkspacesExempt invokes StaffWorkspaces_exempt operation.
	//
	// Exempt a Workspace from the abuse detector (ADR 0026): it is neither warned nor frozen
	// automatically, but stays listed with its rates and can still be suspended by hand. Audited.
	// Idempotent.
	//
	// POST /workspaces/{workspaceId}/exempt
	StaffWorkspacesExempt(ctx context.Context, params StaffWorkspacesExemptParams) (StaffWorkspacesExemptRes, error)
	// StaffWorkspacesGet invokes StaffWorkspaces_get operation.
	//
	// One Workspace's metadata, suspension state, rates and send volume.
	//
	// GET /workspaces/{workspaceId}
	StaffWorkspacesGet(ctx context.Context, params StaffWorkspacesGetParams) (StaffWorkspacesGetRes, error)
	// StaffWorkspacesList invokes StaffWorkspaces_list operation.
	//
	// List all Workspaces, newest first, optionally narrowed by an id or name search.
	//
	// GET /workspaces
	StaffWorkspacesList(ctx context.Context, params StaffWorkspacesListParams) (StaffWorkspacesListRes, error)
	// StaffWorkspacesSuspend invokes StaffWorkspaces_suspend operation.
	//
	// Suspend a Workspace's outbound sending (ADR 0007) with a required reason, as the signed-in Staff
	// member. Idempotent: an already-suspended Workspace is left as it was.
	//
	// POST /workspaces/{workspaceId}/suspend
	StaffWorkspacesSuspend(ctx context.Context, request *StaffSuspendInput, params StaffWorkspacesSuspendParams) (StaffWorkspacesSuspendRes, error)
	// StaffWorkspacesUnexempt invokes StaffWorkspaces_unexempt operation.
	//
	// Police a Workspace by the abuse detector again. Audited. Idempotent.
	//
	// POST /workspaces/{workspaceId}/unexempt
	StaffWorkspacesUnexempt(ctx context.Context, params StaffWorkspacesUnexemptParams) (StaffWorkspacesUnexemptRes, error)
	// StaffWorkspacesUnsuspend invokes StaffWorkspaces_unsuspend operation.
	//
	// Lift a Workspace's suspension; held sends resume. Idempotent: a Workspace that is not suspended is
	// left as it was.
	//
	// POST /workspaces/{workspaceId}/unsuspend
	StaffWorkspacesUnsuspend(ctx context.Context, params StaffWorkspacesUnsuspendParams) (StaffWorkspacesUnsuspendRes, 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 NilFloat64

type NilFloat64 struct {
	Value float64
	Null  bool
}

NilFloat64 is nullable float64.

func NewNilFloat64

func NewNilFloat64(v float64) NilFloat64

NewNilFloat64 returns new NilFloat64 with value set to v.

func (*NilFloat64) Decode

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

Decode decodes float64 from json.

func (NilFloat64) Encode

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

Encode encodes float64 as json.

func (NilFloat64) Get

func (o NilFloat64) Get() (v float64, ok bool)

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

func (NilFloat64) IsNull

func (o NilFloat64) IsNull() bool

IsNull returns true if value is Null.

func (NilFloat64) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (NilFloat64) Or

func (o NilFloat64) Or(d float64) float64

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

func (*NilFloat64) SetTo

func (o *NilFloat64) SetTo(v float64)

SetTo sets value to v.

func (*NilFloat64) SetToNull

func (o *NilFloat64) SetToNull()

SetToNull sets value to null.

func (*NilFloat64) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	StaffAuthLoginOperation           OperationName = "StaffAuthLogin"
	StaffAuthLogoutOperation          OperationName = "StaffAuthLogout"
	StaffAuthSecondFactorOperation    OperationName = "StaffAuthSecondFactor"
	StaffMeGetOperation               OperationName = "StaffMeGet"
	StaffSignupSurveyCountsOperation  OperationName = "StaffSignupSurveyCounts"
	StaffSignupSurveyGetOperation     OperationName = "StaffSignupSurveyGet"
	StaffWorkspaceAuditListOperation  OperationName = "StaffWorkspaceAuditList"
	StaffWorkspacesExemptOperation    OperationName = "StaffWorkspacesExempt"
	StaffWorkspacesGetOperation       OperationName = "StaffWorkspacesGet"
	StaffWorkspacesListOperation      OperationName = "StaffWorkspacesList"
	StaffWorkspacesSuspendOperation   OperationName = "StaffWorkspacesSuspend"
	StaffWorkspacesUnexemptOperation  OperationName = "StaffWorkspacesUnexempt"
	StaffWorkspacesUnsuspendOperation OperationName = "StaffWorkspacesUnsuspend"
)

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 OptNilStaffAbuseWarning

type OptNilStaffAbuseWarning struct {
	Value StaffAbuseWarning
	Set   bool
	Null  bool
}

OptNilStaffAbuseWarning is optional nullable StaffAbuseWarning.

func NewOptNilStaffAbuseWarning

func NewOptNilStaffAbuseWarning(v StaffAbuseWarning) OptNilStaffAbuseWarning

NewOptNilStaffAbuseWarning returns new OptNilStaffAbuseWarning with value set to v.

func (*OptNilStaffAbuseWarning) Decode

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

Decode decodes StaffAbuseWarning from json.

func (OptNilStaffAbuseWarning) Encode

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

Encode encodes StaffAbuseWarning as json.

func (OptNilStaffAbuseWarning) Get

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

func (OptNilStaffAbuseWarning) IsEmpty

func (o OptNilStaffAbuseWarning) IsEmpty() bool

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

func (OptNilStaffAbuseWarning) IsNull

func (o OptNilStaffAbuseWarning) IsNull() bool

IsNull returns true if value is Null.

func (OptNilStaffAbuseWarning) IsSet

func (o OptNilStaffAbuseWarning) IsSet() bool

IsSet returns true if OptNilStaffAbuseWarning was set.

func (OptNilStaffAbuseWarning) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptNilStaffAbuseWarning) Or

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

func (*OptNilStaffAbuseWarning) Reset

func (o *OptNilStaffAbuseWarning) Reset()

Reset unsets value.

func (*OptNilStaffAbuseWarning) SetTo

SetTo sets value to v.

func (*OptNilStaffAbuseWarning) SetToNull

func (o *OptNilStaffAbuseWarning) SetToNull()

SetToNull sets value to null.

func (*OptNilStaffAbuseWarning) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilStaffAuditEntryResourceDiff

type OptNilStaffAuditEntryResourceDiff struct {
	Value StaffAuditEntryResourceDiff
	Set   bool
	Null  bool
}

OptNilStaffAuditEntryResourceDiff is optional nullable StaffAuditEntryResourceDiff.

func NewOptNilStaffAuditEntryResourceDiff

func NewOptNilStaffAuditEntryResourceDiff(v StaffAuditEntryResourceDiff) OptNilStaffAuditEntryResourceDiff

NewOptNilStaffAuditEntryResourceDiff returns new OptNilStaffAuditEntryResourceDiff with value set to v.

func (*OptNilStaffAuditEntryResourceDiff) Decode

Decode decodes StaffAuditEntryResourceDiff from json.

func (OptNilStaffAuditEntryResourceDiff) Encode

Encode encodes StaffAuditEntryResourceDiff as json.

func (OptNilStaffAuditEntryResourceDiff) Get

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

func (OptNilStaffAuditEntryResourceDiff) IsEmpty

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

func (OptNilStaffAuditEntryResourceDiff) IsNull

IsNull returns true if value is Null.

func (OptNilStaffAuditEntryResourceDiff) IsSet

IsSet returns true if OptNilStaffAuditEntryResourceDiff was set.

func (OptNilStaffAuditEntryResourceDiff) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptNilStaffAuditEntryResourceDiff) Or

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

func (*OptNilStaffAuditEntryResourceDiff) Reset

Reset unsets value.

func (*OptNilStaffAuditEntryResourceDiff) SetTo

SetTo sets value to v.

func (*OptNilStaffAuditEntryResourceDiff) SetToNull

func (o *OptNilStaffAuditEntryResourceDiff) SetToNull()

SetToNull sets value to null.

func (*OptNilStaffAuditEntryResourceDiff) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilStaffSignupSource

type OptNilStaffSignupSource struct {
	Value StaffSignupSource
	Set   bool
	Null  bool
}

OptNilStaffSignupSource is optional nullable StaffSignupSource.

func NewOptNilStaffSignupSource

func NewOptNilStaffSignupSource(v StaffSignupSource) OptNilStaffSignupSource

NewOptNilStaffSignupSource returns new OptNilStaffSignupSource with value set to v.

func (*OptNilStaffSignupSource) Decode

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

Decode decodes StaffSignupSource from json.

func (OptNilStaffSignupSource) Encode

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

Encode encodes StaffSignupSource as json.

func (OptNilStaffSignupSource) Get

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

func (OptNilStaffSignupSource) IsEmpty

func (o OptNilStaffSignupSource) IsEmpty() bool

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

func (OptNilStaffSignupSource) IsNull

func (o OptNilStaffSignupSource) IsNull() bool

IsNull returns true if value is Null.

func (OptNilStaffSignupSource) IsSet

func (o OptNilStaffSignupSource) IsSet() bool

IsSet returns true if OptNilStaffSignupSource was set.

func (OptNilStaffSignupSource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptNilStaffSignupSource) Or

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

func (*OptNilStaffSignupSource) Reset

func (o *OptNilStaffSignupSource) Reset()

Reset unsets value.

func (*OptNilStaffSignupSource) SetTo

SetTo sets value to v.

func (*OptNilStaffSignupSource) SetToNull

func (o *OptNilStaffSignupSource) SetToNull()

SetToNull sets value to null.

func (*OptNilStaffSignupSource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilStaffSuspension

type OptNilStaffSuspension struct {
	Value StaffSuspension
	Set   bool
	Null  bool
}

OptNilStaffSuspension is optional nullable StaffSuspension.

func NewOptNilStaffSuspension

func NewOptNilStaffSuspension(v StaffSuspension) OptNilStaffSuspension

NewOptNilStaffSuspension returns new OptNilStaffSuspension with value set to v.

func (*OptNilStaffSuspension) Decode

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

Decode decodes StaffSuspension from json.

func (OptNilStaffSuspension) Encode

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

Encode encodes StaffSuspension as json.

func (OptNilStaffSuspension) Get

func (o OptNilStaffSuspension) Get() (v StaffSuspension, ok bool)

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

func (OptNilStaffSuspension) IsEmpty

func (o OptNilStaffSuspension) IsEmpty() bool

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

func (OptNilStaffSuspension) IsNull

func (o OptNilStaffSuspension) IsNull() bool

IsNull returns true if value is Null.

func (OptNilStaffSuspension) IsSet

func (o OptNilStaffSuspension) IsSet() bool

IsSet returns true if OptNilStaffSuspension was set.

func (OptNilStaffSuspension) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptNilStaffSuspension) Or

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

func (*OptNilStaffSuspension) Reset

func (o *OptNilStaffSuspension) Reset()

Reset unsets value.

func (*OptNilStaffSuspension) SetTo

SetTo sets value to v.

func (*OptNilStaffSuspension) SetToNull

func (o *OptNilStaffSuspension) SetToNull()

SetToNull sets value to null.

func (*OptNilStaffSuspension) UnmarshalJSON

func (s *OptNilStaffSuspension) 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 OptStaffEnrolment

type OptStaffEnrolment struct {
	Value StaffEnrolment
	Set   bool
}

OptStaffEnrolment is optional StaffEnrolment.

func NewOptStaffEnrolment

func NewOptStaffEnrolment(v StaffEnrolment) OptStaffEnrolment

NewOptStaffEnrolment returns new OptStaffEnrolment with value set to v.

func (*OptStaffEnrolment) Decode

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

Decode decodes StaffEnrolment from json.

func (OptStaffEnrolment) Encode

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

Encode encodes StaffEnrolment as json.

func (OptStaffEnrolment) Get

func (o OptStaffEnrolment) Get() (v StaffEnrolment, ok bool)

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

func (OptStaffEnrolment) IsSet

func (o OptStaffEnrolment) IsSet() bool

IsSet returns true if OptStaffEnrolment was set.

func (OptStaffEnrolment) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptStaffEnrolment) Or

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

func (*OptStaffEnrolment) Reset

func (o *OptStaffEnrolment) Reset()

Reset unsets value.

func (*OptStaffEnrolment) SetTo

func (o *OptStaffEnrolment) SetTo(v StaffEnrolment)

SetTo sets value to v.

func (*OptStaffEnrolment) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptStaffWorkspaceReview

type OptStaffWorkspaceReview struct {
	Value StaffWorkspaceReview
	Set   bool
}

OptStaffWorkspaceReview is optional StaffWorkspaceReview.

func NewOptStaffWorkspaceReview

func NewOptStaffWorkspaceReview(v StaffWorkspaceReview) OptStaffWorkspaceReview

NewOptStaffWorkspaceReview returns new OptStaffWorkspaceReview with value set to v.

func (OptStaffWorkspaceReview) Get

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

func (OptStaffWorkspaceReview) IsSet

func (o OptStaffWorkspaceReview) IsSet() bool

IsSet returns true if OptStaffWorkspaceReview was set.

func (OptStaffWorkspaceReview) Or

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

func (*OptStaffWorkspaceReview) Reset

func (o *OptStaffWorkspaceReview) Reset()

Reset unsets value.

func (*OptStaffWorkspaceReview) SetTo

SetTo sets value to v.

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 {
	// HandleApiKeyAuth handles ApiKeyAuth security.
	HandleApiKeyAuth(ctx context.Context, operationName OperationName, t ApiKeyAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// ApiKeyAuth provides ApiKeyAuth security value.
	ApiKeyAuth(ctx context.Context, operationName OperationName) (ApiKeyAuth, 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 StaffAbuse

type StaffAbuse struct {
	// Exempt from the detector: neither warned nor frozen automatically.
	Exempt bool `json:"exempt"`
	// When a Staff member last lifted a suspension; the detector counts only Events after it.
	ClearedAt OptNilTimestamp `json:"clearedAt"`
	// When the owners were told of the current warning; absent outside an episode.
	WarningNotifiedAt OptNilTimestamp `json:"warningNotifiedAt"`
	// When the owners were last told of a suspension.
	FreezeNotifiedAt OptNilTimestamp `json:"freezeNotifiedAt"`
	// Present while the Workspace is in the warning tier, computed now.
	Warning OptNilStaffAbuseWarning `json:"warning"`
}

A Workspace's standing with the abuse detector (ADR 0026). Ref: #/components/schemas/StaffAbuse

func (*StaffAbuse) Decode

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

Decode decodes StaffAbuse from json.

func (*StaffAbuse) Encode

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

Encode implements json.Marshaler.

func (*StaffAbuse) GetClearedAt

func (s *StaffAbuse) GetClearedAt() OptNilTimestamp

GetClearedAt returns the value of ClearedAt.

func (*StaffAbuse) GetExempt

func (s *StaffAbuse) GetExempt() bool

GetExempt returns the value of Exempt.

func (*StaffAbuse) GetFreezeNotifiedAt

func (s *StaffAbuse) GetFreezeNotifiedAt() OptNilTimestamp

GetFreezeNotifiedAt returns the value of FreezeNotifiedAt.

func (*StaffAbuse) GetWarning

func (s *StaffAbuse) GetWarning() OptNilStaffAbuseWarning

GetWarning returns the value of Warning.

func (*StaffAbuse) GetWarningNotifiedAt

func (s *StaffAbuse) GetWarningNotifiedAt() OptNilTimestamp

GetWarningNotifiedAt returns the value of WarningNotifiedAt.

func (*StaffAbuse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAbuse) SetClearedAt

func (s *StaffAbuse) SetClearedAt(val OptNilTimestamp)

SetClearedAt sets the value of ClearedAt.

func (*StaffAbuse) SetExempt

func (s *StaffAbuse) SetExempt(val bool)

SetExempt sets the value of Exempt.

func (*StaffAbuse) SetFreezeNotifiedAt

func (s *StaffAbuse) SetFreezeNotifiedAt(val OptNilTimestamp)

SetFreezeNotifiedAt sets the value of FreezeNotifiedAt.

func (*StaffAbuse) SetWarning

func (s *StaffAbuse) SetWarning(val OptNilStaffAbuseWarning)

SetWarning sets the value of Warning.

func (*StaffAbuse) SetWarningNotifiedAt

func (s *StaffAbuse) SetWarningNotifiedAt(val OptNilTimestamp)

SetWarningNotifiedAt sets the value of WarningNotifiedAt.

func (*StaffAbuse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAbuse) Validate

func (s *StaffAbuse) Validate() error

type StaffAbuseMetric

type StaffAbuseMetric string

Which metric of a Sending domain breached the abuse detector's warning limit. Ref: #/components/schemas/StaffAbuseMetric

const (
	StaffAbuseMetricComplaint StaffAbuseMetric = "complaint"
	StaffAbuseMetricBounce    StaffAbuseMetric = "bounce"
)

func (StaffAbuseMetric) AllValues

func (StaffAbuseMetric) AllValues() []StaffAbuseMetric

AllValues returns all StaffAbuseMetric values.

func (*StaffAbuseMetric) Decode

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

Decode decodes StaffAbuseMetric from json.

func (StaffAbuseMetric) Encode

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

Encode encodes StaffAbuseMetric as json.

func (StaffAbuseMetric) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffAbuseMetric) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffAbuseMetric) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAbuseMetric) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffAbuseMetric) Validate

func (s StaffAbuseMetric) Validate() error

type StaffAbuseWarning

type StaffAbuseWarning struct {
	Domain string           `json:"domain"`
	Metric StaffAbuseMetric `json:"metric"`
	// The rate, 0–1.
	Rate float64 `json:"rate"`
}

A Sending domain in the warning tier (ADR 0026), by the detector's own computation. Ref: #/components/schemas/StaffAbuseWarning

func (*StaffAbuseWarning) Decode

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

Decode decodes StaffAbuseWarning from json.

func (*StaffAbuseWarning) Encode

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

Encode implements json.Marshaler.

func (*StaffAbuseWarning) GetDomain

func (s *StaffAbuseWarning) GetDomain() string

GetDomain returns the value of Domain.

func (*StaffAbuseWarning) GetMetric

func (s *StaffAbuseWarning) GetMetric() StaffAbuseMetric

GetMetric returns the value of Metric.

func (*StaffAbuseWarning) GetRate

func (s *StaffAbuseWarning) GetRate() float64

GetRate returns the value of Rate.

func (*StaffAbuseWarning) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAbuseWarning) SetDomain

func (s *StaffAbuseWarning) SetDomain(val string)

SetDomain sets the value of Domain.

func (*StaffAbuseWarning) SetMetric

func (s *StaffAbuseWarning) SetMetric(val StaffAbuseMetric)

SetMetric sets the value of Metric.

func (*StaffAbuseWarning) SetRate

func (s *StaffAbuseWarning) SetRate(val float64)

SetRate sets the value of Rate.

func (*StaffAbuseWarning) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAbuseWarning) Validate

func (s *StaffAbuseWarning) Validate() error

type StaffAuditActor

type StaffAuditActor struct {
	// The kind of actor; a staff member carries no id and the name "Sphericon staff"; a service is a
	// Service credential, named as the Staff member who issued it chose.
	Kind StaffAuditActorKind `json:"kind"`
	// The actor's id (a User id or an API token id); absent for the system and a staff member.
	ID OptNilString `json:"id"`
	// Display name snapshot taken when the entry was written.
	Name OptNilString `json:"name"`
}

The actor of an Audit entry. Ref: #/components/schemas/StaffAuditActor

func (*StaffAuditActor) Decode

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

Decode decodes StaffAuditActor from json.

func (*StaffAuditActor) Encode

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

Encode implements json.Marshaler.

func (*StaffAuditActor) GetID

func (s *StaffAuditActor) GetID() OptNilString

GetID returns the value of ID.

func (*StaffAuditActor) GetKind

func (s *StaffAuditActor) GetKind() StaffAuditActorKind

GetKind returns the value of Kind.

func (*StaffAuditActor) GetName

func (s *StaffAuditActor) GetName() OptNilString

GetName returns the value of Name.

func (*StaffAuditActor) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAuditActor) SetID

func (s *StaffAuditActor) SetID(val OptNilString)

SetID sets the value of ID.

func (*StaffAuditActor) SetKind

func (s *StaffAuditActor) SetKind(val StaffAuditActorKind)

SetKind sets the value of Kind.

func (*StaffAuditActor) SetName

func (s *StaffAuditActor) SetName(val OptNilString)

SetName sets the value of Name.

func (*StaffAuditActor) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAuditActor) Validate

func (s *StaffAuditActor) Validate() error

type StaffAuditActorKind

type StaffAuditActorKind string

Who performed an audited change, as the Workspace's own team sees it. Ref: #/components/schemas/StaffAuditActorKind

const (
	StaffAuditActorKindUser     StaffAuditActorKind = "user"
	StaffAuditActorKindAPIToken StaffAuditActorKind = "api_token"
	StaffAuditActorKindStaff    StaffAuditActorKind = "staff"
	StaffAuditActorKindService  StaffAuditActorKind = "service"
	StaffAuditActorKindSystem   StaffAuditActorKind = "system"
)

func (StaffAuditActorKind) AllValues

AllValues returns all StaffAuditActorKind values.

func (*StaffAuditActorKind) Decode

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

Decode decodes StaffAuditActorKind from json.

func (StaffAuditActorKind) Encode

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

Encode encodes StaffAuditActorKind as json.

func (StaffAuditActorKind) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffAuditActorKind) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffAuditActorKind) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAuditActorKind) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffAuditActorKind) Validate

func (s StaffAuditActorKind) Validate() error

type StaffAuditEntryList

type StaffAuditEntryList struct {
	Items []StaffAuditEntryResource `json:"items"`
	// Pass as `cursor` for the next page; absent on the last page.
	NextCursor OptNilString `json:"nextCursor"`
}

A page of a Workspace's Audit log, newest first. Ref: #/components/schemas/StaffAuditEntryList

func (*StaffAuditEntryList) Decode

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

Decode decodes StaffAuditEntryList from json.

func (*StaffAuditEntryList) Encode

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

Encode implements json.Marshaler.

func (*StaffAuditEntryList) GetItems

GetItems returns the value of Items.

func (*StaffAuditEntryList) GetNextCursor

func (s *StaffAuditEntryList) GetNextCursor() OptNilString

GetNextCursor returns the value of NextCursor.

func (*StaffAuditEntryList) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAuditEntryList) SetItems

func (s *StaffAuditEntryList) SetItems(val []StaffAuditEntryResource)

SetItems sets the value of Items.

func (*StaffAuditEntryList) SetNextCursor

func (s *StaffAuditEntryList) SetNextCursor(val OptNilString)

SetNextCursor sets the value of NextCursor.

func (*StaffAuditEntryList) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAuditEntryList) Validate

func (s *StaffAuditEntryList) Validate() error

type StaffAuditEntryResource

type StaffAuditEntryResource struct {
	// Unique identifier.
	ID EntityId `json:"id"`
	// When the change happened.
	OccurredAt Timestamp `json:"occurredAt"`
	// Who did it.
	Actor StaffAuditActor `json:"actor"`
	// What was done, as `<entity>.<verb>`.
	Action string `json:"action"`
	// What it was done to.
	Target StaffAuditTarget `json:"target"`
	// Before/after of the changed fields.
	Diff OptNilStaffAuditEntryResourceDiff `json:"diff"`
	// Request id of the change.
	RequestId OptNilString `json:"requestId"`
	// Client address of the change.
	IP OptNilString `json:"ip"`
	// Client user agent of the change.
	UserAgent OptNilString `json:"userAgent"`
}

One immutable Audit entry of a Workspace. Secrets are never recorded; they appear as changed only. Ref: #/components/schemas/StaffAuditEntryResource

func (*StaffAuditEntryResource) Decode

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

Decode decodes StaffAuditEntryResource from json.

func (*StaffAuditEntryResource) Encode

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

Encode implements json.Marshaler.

func (*StaffAuditEntryResource) GetAction

func (s *StaffAuditEntryResource) GetAction() string

GetAction returns the value of Action.

func (*StaffAuditEntryResource) GetActor

GetActor returns the value of Actor.

func (*StaffAuditEntryResource) GetDiff

GetDiff returns the value of Diff.

func (*StaffAuditEntryResource) GetID

func (s *StaffAuditEntryResource) GetID() EntityId

GetID returns the value of ID.

func (*StaffAuditEntryResource) GetIP

GetIP returns the value of IP.

func (*StaffAuditEntryResource) GetOccurredAt

func (s *StaffAuditEntryResource) GetOccurredAt() Timestamp

GetOccurredAt returns the value of OccurredAt.

func (*StaffAuditEntryResource) GetRequestId

func (s *StaffAuditEntryResource) GetRequestId() OptNilString

GetRequestId returns the value of RequestId.

func (*StaffAuditEntryResource) GetTarget

GetTarget returns the value of Target.

func (*StaffAuditEntryResource) GetUserAgent

func (s *StaffAuditEntryResource) GetUserAgent() OptNilString

GetUserAgent returns the value of UserAgent.

func (*StaffAuditEntryResource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAuditEntryResource) SetAction

func (s *StaffAuditEntryResource) SetAction(val string)

SetAction sets the value of Action.

func (*StaffAuditEntryResource) SetActor

func (s *StaffAuditEntryResource) SetActor(val StaffAuditActor)

SetActor sets the value of Actor.

func (*StaffAuditEntryResource) SetDiff

SetDiff sets the value of Diff.

func (*StaffAuditEntryResource) SetID

func (s *StaffAuditEntryResource) SetID(val EntityId)

SetID sets the value of ID.

func (*StaffAuditEntryResource) SetIP

func (s *StaffAuditEntryResource) SetIP(val OptNilString)

SetIP sets the value of IP.

func (*StaffAuditEntryResource) SetOccurredAt

func (s *StaffAuditEntryResource) SetOccurredAt(val Timestamp)

SetOccurredAt sets the value of OccurredAt.

func (*StaffAuditEntryResource) SetRequestId

func (s *StaffAuditEntryResource) SetRequestId(val OptNilString)

SetRequestId sets the value of RequestId.

func (*StaffAuditEntryResource) SetTarget

func (s *StaffAuditEntryResource) SetTarget(val StaffAuditTarget)

SetTarget sets the value of Target.

func (*StaffAuditEntryResource) SetUserAgent

func (s *StaffAuditEntryResource) SetUserAgent(val OptNilString)

SetUserAgent sets the value of UserAgent.

func (*StaffAuditEntryResource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffAuditEntryResource) Validate

func (s *StaffAuditEntryResource) Validate() error

type StaffAuditEntryResourceDiff

type StaffAuditEntryResourceDiff map[string]jx.Raw

Before/after of the changed fields.

func (*StaffAuditEntryResourceDiff) Decode

Decode decodes StaffAuditEntryResourceDiff from json.

func (StaffAuditEntryResourceDiff) Encode

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

Encode implements json.Marshaler.

func (StaffAuditEntryResourceDiff) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAuditEntryResourceDiff) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffAuditTarget

type StaffAuditTarget struct {
	// Entity type, e.g. membership.
	Type string `json:"type"`
	// The target's id.
	ID OptNilString `json:"id"`
	// Name snapshot taken when the entry was written.
	Name OptNilString `json:"name"`
}

What an audited change was done to. Ref: #/components/schemas/StaffAuditTarget

func (*StaffAuditTarget) Decode

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

Decode decodes StaffAuditTarget from json.

func (*StaffAuditTarget) Encode

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

Encode implements json.Marshaler.

func (*StaffAuditTarget) GetID

func (s *StaffAuditTarget) GetID() OptNilString

GetID returns the value of ID.

func (*StaffAuditTarget) GetName

func (s *StaffAuditTarget) GetName() OptNilString

GetName returns the value of Name.

func (*StaffAuditTarget) GetType

func (s *StaffAuditTarget) GetType() string

GetType returns the value of Type.

func (*StaffAuditTarget) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffAuditTarget) SetID

func (s *StaffAuditTarget) SetID(val OptNilString)

SetID sets the value of ID.

func (*StaffAuditTarget) SetName

func (s *StaffAuditTarget) SetName(val OptNilString)

SetName sets the value of Name.

func (*StaffAuditTarget) SetType

func (s *StaffAuditTarget) SetType(val string)

SetType sets the value of Type.

func (*StaffAuditTarget) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffAuthLoginRes

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

type StaffAuthLogoutNoContent

type StaffAuthLogoutNoContent struct {
	SetCookie string
}

StaffAuthLogoutNoContent is response for StaffAuthLogout operation.

func (*StaffAuthLogoutNoContent) GetSetCookie

func (s *StaffAuthLogoutNoContent) GetSetCookie() string

GetSetCookie returns the value of SetCookie.

func (*StaffAuthLogoutNoContent) SetSetCookie

func (s *StaffAuthLogoutNoContent) SetSetCookie(val string)

SetSetCookie sets the value of SetCookie.

type StaffAuthLogoutRes

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

type StaffAuthSecondFactorRes

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

type StaffDeliverability

type StaffDeliverability struct {
	// Length of the trailing window, in hours.
	WindowHours int32 `json:"windowHours"`
	// Fewest sends in the window (per Sending domain) for a rate to be defined.
	VolumeFloor int32 `json:"volumeFloor"`
	// Messages sent in the window across all Sending domains.
	SendVolume int32 `json:"sendVolume"`
	// One entry per Sending domain, oldest first.
	Domains []StaffDomainRates `json:"domains"`
}

A Workspace's deliverability over the trailing window: the rates of ADR 0011 per Sending domain, and how much it sent. Counts only, never message content. Ref: #/components/schemas/StaffDeliverability

func (*StaffDeliverability) Decode

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

Decode decodes StaffDeliverability from json.

func (*StaffDeliverability) Encode

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

Encode implements json.Marshaler.

func (*StaffDeliverability) GetDomains

func (s *StaffDeliverability) GetDomains() []StaffDomainRates

GetDomains returns the value of Domains.

func (*StaffDeliverability) GetSendVolume

func (s *StaffDeliverability) GetSendVolume() int32

GetSendVolume returns the value of SendVolume.

func (*StaffDeliverability) GetVolumeFloor

func (s *StaffDeliverability) GetVolumeFloor() int32

GetVolumeFloor returns the value of VolumeFloor.

func (*StaffDeliverability) GetWindowHours

func (s *StaffDeliverability) GetWindowHours() int32

GetWindowHours returns the value of WindowHours.

func (*StaffDeliverability) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffDeliverability) SetDomains

func (s *StaffDeliverability) SetDomains(val []StaffDomainRates)

SetDomains sets the value of Domains.

func (*StaffDeliverability) SetSendVolume

func (s *StaffDeliverability) SetSendVolume(val int32)

SetSendVolume sets the value of SendVolume.

func (*StaffDeliverability) SetVolumeFloor

func (s *StaffDeliverability) SetVolumeFloor(val int32)

SetVolumeFloor sets the value of VolumeFloor.

func (*StaffDeliverability) SetWindowHours

func (s *StaffDeliverability) SetWindowHours(val int32)

SetWindowHours sets the value of WindowHours.

func (*StaffDeliverability) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffDeliverability) Validate

func (s *StaffDeliverability) Validate() error

type StaffDomainRates

type StaffDomainRates struct {
	// Sending domain id.
	SendingDomainId EntityId `json:"sendingDomainId"`
	// The domain the rates are for.
	Domain string `json:"domain"`
	// Complaints over delivered mail; the rate is null when nothing was delivered in the window.
	ComplaintRate StaffRate `json:"complaintRate"`
	// Hard bounces over sent.
	BounceRate StaffRate `json:"bounceRate"`
}

The Complaint and Bounce rates of one Sending domain over the trailing window. Ref: #/components/schemas/StaffDomainRates

func (*StaffDomainRates) Decode

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

Decode decodes StaffDomainRates from json.

func (*StaffDomainRates) Encode

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

Encode implements json.Marshaler.

func (*StaffDomainRates) GetBounceRate

func (s *StaffDomainRates) GetBounceRate() StaffRate

GetBounceRate returns the value of BounceRate.

func (*StaffDomainRates) GetComplaintRate

func (s *StaffDomainRates) GetComplaintRate() StaffRate

GetComplaintRate returns the value of ComplaintRate.

func (*StaffDomainRates) GetDomain

func (s *StaffDomainRates) GetDomain() string

GetDomain returns the value of Domain.

func (*StaffDomainRates) GetSendingDomainId

func (s *StaffDomainRates) GetSendingDomainId() EntityId

GetSendingDomainId returns the value of SendingDomainId.

func (*StaffDomainRates) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffDomainRates) SetBounceRate

func (s *StaffDomainRates) SetBounceRate(val StaffRate)

SetBounceRate sets the value of BounceRate.

func (*StaffDomainRates) SetComplaintRate

func (s *StaffDomainRates) SetComplaintRate(val StaffRate)

SetComplaintRate sets the value of ComplaintRate.

func (*StaffDomainRates) SetDomain

func (s *StaffDomainRates) SetDomain(val string)

SetDomain sets the value of Domain.

func (*StaffDomainRates) SetSendingDomainId

func (s *StaffDomainRates) SetSendingDomainId(val EntityId)

SetSendingDomainId sets the value of SendingDomainId.

func (*StaffDomainRates) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffDomainRates) Validate

func (s *StaffDomainRates) Validate() error

type StaffEnrolment

type StaffEnrolment struct {
	// Base32 key.
	Secret string `json:"secret"`
	// Otpauth:// URI.
	URI string `json:"uri"`
	// PNG data URI of the URI.
	QrCode string `json:"qrCode"`
}

A TOTP secret awaiting its first confirming code. Ref: #/components/schemas/StaffEnrolment

func (*StaffEnrolment) Decode

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

Decode decodes StaffEnrolment from json.

func (*StaffEnrolment) Encode

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

Encode implements json.Marshaler.

func (*StaffEnrolment) GetQrCode

func (s *StaffEnrolment) GetQrCode() string

GetQrCode returns the value of QrCode.

func (*StaffEnrolment) GetSecret

func (s *StaffEnrolment) GetSecret() string

GetSecret returns the value of Secret.

func (*StaffEnrolment) GetURI

func (s *StaffEnrolment) GetURI() string

GetURI returns the value of URI.

func (*StaffEnrolment) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffEnrolment) SetQrCode

func (s *StaffEnrolment) SetQrCode(val string)

SetQrCode sets the value of QrCode.

func (*StaffEnrolment) SetSecret

func (s *StaffEnrolment) SetSecret(val string)

SetSecret sets the value of Secret.

func (*StaffEnrolment) SetURI

func (s *StaffEnrolment) SetURI(val string)

SetURI sets the value of URI.

func (*StaffEnrolment) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffExemptionChange

type StaffExemptionChange struct {
	Changed   bool                   `json:"changed"`
	Workspace StaffWorkspaceResource `json:"workspace"`
}

The outcome of an exempt or un-exempt: the Workspace as it now stands, and whether anything changed. Ref: #/components/schemas/StaffExemptionChange

func (*StaffExemptionChange) Decode

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

Decode decodes StaffExemptionChange from json.

func (*StaffExemptionChange) Encode

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

Encode implements json.Marshaler.

func (*StaffExemptionChange) GetChanged

func (s *StaffExemptionChange) GetChanged() bool

GetChanged returns the value of Changed.

func (*StaffExemptionChange) GetWorkspace

func (s *StaffExemptionChange) GetWorkspace() StaffWorkspaceResource

GetWorkspace returns the value of Workspace.

func (*StaffExemptionChange) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffExemptionChange) SetChanged

func (s *StaffExemptionChange) SetChanged(val bool)

SetChanged sets the value of Changed.

func (*StaffExemptionChange) SetWorkspace

func (s *StaffExemptionChange) SetWorkspace(val StaffWorkspaceResource)

SetWorkspace sets the value of Workspace.

func (*StaffExemptionChange) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffExemptionChange) Validate

func (s *StaffExemptionChange) Validate() error

type StaffHold

type StaffHold struct {
	// Unique per Workspace, chosen by the setter.
	Key string `json:"key"`
	// Machine reason code.
	ReasonCode string `json:"reasonCode"`
	// The message the setter gave for the Owner.
	Message string `json:"message"`
	// When the hold was first set.
	CreatedAt Timestamp `json:"createdAt"`
	// When the hold lapses unless renewed.
	ExpiresAt Timestamp `json:"expiresAt"`
	// Who set it: the name of its Service credential.
	SetBy string `json:"setBy"`
	// Where an Owner or Admin can resolve the hold, as the setter gave it; absent when none was given.
	ActionUrl OptNilString `json:"actionUrl"`
}

An active Staff hold on a Workspace, as the console shows it (read only). Ref: #/components/schemas/StaffHold

func (*StaffHold) Decode

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

Decode decodes StaffHold from json.

func (*StaffHold) Encode

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

Encode implements json.Marshaler.

func (*StaffHold) GetActionUrl

func (s *StaffHold) GetActionUrl() OptNilString

GetActionUrl returns the value of ActionUrl.

func (*StaffHold) GetCreatedAt

func (s *StaffHold) GetCreatedAt() Timestamp

GetCreatedAt returns the value of CreatedAt.

func (*StaffHold) GetExpiresAt

func (s *StaffHold) GetExpiresAt() Timestamp

GetExpiresAt returns the value of ExpiresAt.

func (*StaffHold) GetKey

func (s *StaffHold) GetKey() string

GetKey returns the value of Key.

func (*StaffHold) GetMessage

func (s *StaffHold) GetMessage() string

GetMessage returns the value of Message.

func (*StaffHold) GetReasonCode

func (s *StaffHold) GetReasonCode() string

GetReasonCode returns the value of ReasonCode.

func (*StaffHold) GetSetBy

func (s *StaffHold) GetSetBy() string

GetSetBy returns the value of SetBy.

func (*StaffHold) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffHold) SetActionUrl

func (s *StaffHold) SetActionUrl(val OptNilString)

SetActionUrl sets the value of ActionUrl.

func (*StaffHold) SetCreatedAt

func (s *StaffHold) SetCreatedAt(val Timestamp)

SetCreatedAt sets the value of CreatedAt.

func (*StaffHold) SetExpiresAt

func (s *StaffHold) SetExpiresAt(val Timestamp)

SetExpiresAt sets the value of ExpiresAt.

func (*StaffHold) SetKey

func (s *StaffHold) SetKey(val string)

SetKey sets the value of Key.

func (*StaffHold) SetMessage

func (s *StaffHold) SetMessage(val string)

SetMessage sets the value of Message.

func (*StaffHold) SetReasonCode

func (s *StaffHold) SetReasonCode(val string)

SetReasonCode sets the value of ReasonCode.

func (*StaffHold) SetSetBy

func (s *StaffHold) SetSetBy(val string)

SetSetBy sets the value of SetBy.

func (*StaffHold) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffLoginInput

type StaffLoginInput struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Sign in with an email and password. The email is a plain string: a malformed address must answer like an unknown one. Ref: #/components/schemas/StaffLoginInput

func (*StaffLoginInput) Decode

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

Decode decodes StaffLoginInput from json.

func (*StaffLoginInput) Encode

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

Encode implements json.Marshaler.

func (*StaffLoginInput) GetEmail

func (s *StaffLoginInput) GetEmail() string

GetEmail returns the value of Email.

func (*StaffLoginInput) GetPassword

func (s *StaffLoginInput) GetPassword() string

GetPassword returns the value of Password.

func (*StaffLoginInput) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffLoginInput) SetEmail

func (s *StaffLoginInput) SetEmail(val string)

SetEmail sets the value of Email.

func (*StaffLoginInput) SetPassword

func (s *StaffLoginInput) SetPassword(val string)

SetPassword sets the value of Password.

func (*StaffLoginInput) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffLoginOutcome

type StaffLoginOutcome string

What the password step granted. There is never a session at this step: a TOTP is mandatory (ADR 0026). `challenge`: the Staff member has a TOTP, go on with a code. `enrolment`: the Staff member has none yet (first login); the `enrolment` secret is to be added to an authenticator app, and the first code confirms it. Ref: #/components/schemas/StaffLoginOutcome

const (
	StaffLoginOutcomeChallenge StaffLoginOutcome = "challenge"
	StaffLoginOutcomeEnrolment StaffLoginOutcome = "enrolment"
)

func (StaffLoginOutcome) AllValues

func (StaffLoginOutcome) AllValues() []StaffLoginOutcome

AllValues returns all StaffLoginOutcome values.

func (*StaffLoginOutcome) Decode

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

Decode decodes StaffLoginOutcome from json.

func (StaffLoginOutcome) Encode

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

Encode encodes StaffLoginOutcome as json.

func (StaffLoginOutcome) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffLoginOutcome) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffLoginOutcome) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffLoginOutcome) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffLoginOutcome) Validate

func (s StaffLoginOutcome) Validate() error

type StaffLoginResult

type StaffLoginResult struct {
	Outcome StaffLoginOutcome `json:"outcome"`
	// The signed challenge for the second step: bound to the Staff member, valid for 5 minutes, working
	// for one successful second step.
	Challenge string `json:"challenge"`
	// Present when the outcome is `enrolment`.
	Enrolment OptStaffEnrolment `json:"enrolment"`
}

Ref: #/components/schemas/StaffLoginResult

func (*StaffLoginResult) Decode

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

Decode decodes StaffLoginResult from json.

func (*StaffLoginResult) Encode

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

Encode implements json.Marshaler.

func (*StaffLoginResult) GetChallenge

func (s *StaffLoginResult) GetChallenge() string

GetChallenge returns the value of Challenge.

func (*StaffLoginResult) GetEnrolment

func (s *StaffLoginResult) GetEnrolment() OptStaffEnrolment

GetEnrolment returns the value of Enrolment.

func (*StaffLoginResult) GetOutcome

func (s *StaffLoginResult) GetOutcome() StaffLoginOutcome

GetOutcome returns the value of Outcome.

func (*StaffLoginResult) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffLoginResult) SetChallenge

func (s *StaffLoginResult) SetChallenge(val string)

SetChallenge sets the value of Challenge.

func (*StaffLoginResult) SetEnrolment

func (s *StaffLoginResult) SetEnrolment(val OptStaffEnrolment)

SetEnrolment sets the value of Enrolment.

func (*StaffLoginResult) SetOutcome

func (s *StaffLoginResult) SetOutcome(val StaffLoginOutcome)

SetOutcome sets the value of Outcome.

func (*StaffLoginResult) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffLoginResult) Validate

func (s *StaffLoginResult) Validate() error

type StaffMeGetRes

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

type StaffRate

type StaffRate struct {
	// Events counted against the rate.
	Numerator int32 `json:"numerator"`
	// The population the rate is over.
	Denominator int32 `json:"denominator"`
	// Numerator / denominator; null (undefined) when fewer sends than the volume floor were made in the
	// window, never reported as 0.
	Rate NilFloat64 `json:"rate"`
}

A rate as the (numerator, denominator, rate) triple (ADR 0011). Ref: #/components/schemas/StaffRate

func (*StaffRate) Decode

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

Decode decodes StaffRate from json.

func (*StaffRate) Encode

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

Encode implements json.Marshaler.

func (*StaffRate) GetDenominator

func (s *StaffRate) GetDenominator() int32

GetDenominator returns the value of Denominator.

func (*StaffRate) GetNumerator

func (s *StaffRate) GetNumerator() int32

GetNumerator returns the value of Numerator.

func (*StaffRate) GetRate

func (s *StaffRate) GetRate() NilFloat64

GetRate returns the value of Rate.

func (*StaffRate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffRate) SetDenominator

func (s *StaffRate) SetDenominator(val int32)

SetDenominator sets the value of Denominator.

func (*StaffRate) SetNumerator

func (s *StaffRate) SetNumerator(val int32)

SetNumerator sets the value of Numerator.

func (*StaffRate) SetRate

func (s *StaffRate) SetRate(val NilFloat64)

SetRate sets the value of Rate.

func (*StaffRate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffRate) Validate

func (s *StaffRate) Validate() error

type StaffResource

type StaffResource struct {
	// Unique identifier.
	ID EntityId `json:"id"`
	// Login email.
	Email EmailAddress `json:"email"`
}

The authenticated platform Staff member (shown to customers only as "Sphericon staff"). Ref: #/components/schemas/StaffResource

func (*StaffResource) Decode

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

Decode decodes StaffResource from json.

func (*StaffResource) Encode

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

Encode implements json.Marshaler.

func (*StaffResource) GetEmail

func (s *StaffResource) GetEmail() EmailAddress

GetEmail returns the value of Email.

func (*StaffResource) GetID

func (s *StaffResource) GetID() EntityId

GetID returns the value of ID.

func (*StaffResource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffResource) SetEmail

func (s *StaffResource) SetEmail(val EmailAddress)

SetEmail sets the value of Email.

func (*StaffResource) SetID

func (s *StaffResource) SetID(val EntityId)

SetID sets the value of ID.

func (*StaffResource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffResource) Validate

func (s *StaffResource) Validate() error

type StaffResourceHeaders

type StaffResourceHeaders struct {
	SetCookie string
	Response  StaffResource
}

StaffResourceHeaders wraps StaffResource with response headers.

func (*StaffResourceHeaders) GetResponse

func (s *StaffResourceHeaders) GetResponse() StaffResource

GetResponse returns the value of Response.

func (*StaffResourceHeaders) GetSetCookie

func (s *StaffResourceHeaders) GetSetCookie() string

GetSetCookie returns the value of SetCookie.

func (*StaffResourceHeaders) SetResponse

func (s *StaffResourceHeaders) SetResponse(val StaffResource)

SetResponse sets the value of Response.

func (*StaffResourceHeaders) SetSetCookie

func (s *StaffResourceHeaders) SetSetCookie(val string)

SetSetCookie sets the value of SetCookie.

func (*StaffResourceHeaders) Validate

func (s *StaffResourceHeaders) Validate() error

type StaffSecondFactorInput

type StaffSecondFactorInput struct {
	Challenge string `json:"challenge"`
	// A current TOTP code from the authenticator app.
	Code string `json:"code"`
}

The second login step: the challenge from the password step and a TOTP code. Ref: #/components/schemas/StaffSecondFactorInput

func (*StaffSecondFactorInput) Decode

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

Decode decodes StaffSecondFactorInput from json.

func (*StaffSecondFactorInput) Encode

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

Encode implements json.Marshaler.

func (*StaffSecondFactorInput) GetChallenge

func (s *StaffSecondFactorInput) GetChallenge() string

GetChallenge returns the value of Challenge.

func (*StaffSecondFactorInput) GetCode

func (s *StaffSecondFactorInput) GetCode() string

GetCode returns the value of Code.

func (*StaffSecondFactorInput) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSecondFactorInput) SetChallenge

func (s *StaffSecondFactorInput) SetChallenge(val string)

SetChallenge sets the value of Challenge.

func (*StaffSecondFactorInput) SetCode

func (s *StaffSecondFactorInput) SetCode(val string)

SetCode sets the value of Code.

func (*StaffSecondFactorInput) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffSignupCompanySize

type StaffSignupCompanySize string

How many people work at the User's company (second question). Ref: #/components/schemas/StaffSignupCompanySize

const (
	StaffSignupCompanySize1        StaffSignupCompanySize = "1"
	StaffSignupCompanySize210      StaffSignupCompanySize = "2_10"
	StaffSignupCompanySize1150     StaffSignupCompanySize = "11_50"
	StaffSignupCompanySize51200    StaffSignupCompanySize = "51_200"
	StaffSignupCompanySize2011000  StaffSignupCompanySize = "201_1000"
	StaffSignupCompanySize1000Plus StaffSignupCompanySize = "1000_plus"
	StaffSignupCompanySizeOther    StaffSignupCompanySize = "other"
)

func (StaffSignupCompanySize) AllValues

AllValues returns all StaffSignupCompanySize values.

func (*StaffSignupCompanySize) Decode

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

Decode decodes StaffSignupCompanySize from json.

func (StaffSignupCompanySize) Encode

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

Encode encodes StaffSignupCompanySize as json.

func (StaffSignupCompanySize) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffSignupCompanySize) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffSignupCompanySize) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupCompanySize) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffSignupCompanySize) Validate

func (s StaffSignupCompanySize) Validate() error

type StaffSignupCompanySizeCount

type StaffSignupCompanySizeCount struct {
	Choice StaffSignupCompanySize `json:"choice"`
	Count  int32                  `json:"count"`
}

How many Users chose a company size. Ref: #/components/schemas/StaffSignupCompanySizeCount

func (*StaffSignupCompanySizeCount) Decode

Decode decodes StaffSignupCompanySizeCount from json.

func (*StaffSignupCompanySizeCount) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupCompanySizeCount) GetChoice

GetChoice returns the value of Choice.

func (*StaffSignupCompanySizeCount) GetCount

func (s *StaffSignupCompanySizeCount) GetCount() int32

GetCount returns the value of Count.

func (*StaffSignupCompanySizeCount) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupCompanySizeCount) SetChoice

SetChoice sets the value of Choice.

func (*StaffSignupCompanySizeCount) SetCount

func (s *StaffSignupCompanySizeCount) SetCount(val int32)

SetCount sets the value of Count.

func (*StaffSignupCompanySizeCount) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupCompanySizeCount) Validate

func (s *StaffSignupCompanySizeCount) Validate() error

type StaffSignupGoal

type StaffSignupGoal string

What the User mainly wants to do with the product (third question). Ref: #/components/schemas/StaffSignupGoal

const (
	StaffSignupGoalBroadcasts  StaffSignupGoal = "broadcasts"
	StaffSignupGoalAutomations StaffSignupGoal = "automations"
	StaffSignupGoalTracking    StaffSignupGoal = "tracking"
	StaffSignupGoalMigrating   StaffSignupGoal = "migrating"
	StaffSignupGoalOther       StaffSignupGoal = "other"
)

func (StaffSignupGoal) AllValues

func (StaffSignupGoal) AllValues() []StaffSignupGoal

AllValues returns all StaffSignupGoal values.

func (*StaffSignupGoal) Decode

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

Decode decodes StaffSignupGoal from json.

func (StaffSignupGoal) Encode

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

Encode encodes StaffSignupGoal as json.

func (StaffSignupGoal) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffSignupGoal) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffSignupGoal) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupGoal) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffSignupGoal) Validate

func (s StaffSignupGoal) Validate() error

type StaffSignupGoalCount

type StaffSignupGoalCount struct {
	Choice StaffSignupGoal `json:"choice"`
	Count  int32           `json:"count"`
}

How many Users chose a main goal. Ref: #/components/schemas/StaffSignupGoalCount

func (*StaffSignupGoalCount) Decode

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

Decode decodes StaffSignupGoalCount from json.

func (*StaffSignupGoalCount) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupGoalCount) GetChoice

func (s *StaffSignupGoalCount) GetChoice() StaffSignupGoal

GetChoice returns the value of Choice.

func (*StaffSignupGoalCount) GetCount

func (s *StaffSignupGoalCount) GetCount() int32

GetCount returns the value of Count.

func (*StaffSignupGoalCount) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupGoalCount) SetChoice

func (s *StaffSignupGoalCount) SetChoice(val StaffSignupGoal)

SetChoice sets the value of Choice.

func (*StaffSignupGoalCount) SetCount

func (s *StaffSignupGoalCount) SetCount(val int32)

SetCount sets the value of Count.

func (*StaffSignupGoalCount) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupGoalCount) Validate

func (s *StaffSignupGoalCount) Validate() error

type StaffSignupOtherTextCount

type StaffSignupOtherTextCount struct {
	Text  string `json:"text"`
	Count int32  `json:"count"`
}

An `other` text and how many Users wrote it. Ref: #/components/schemas/StaffSignupOtherTextCount

func (*StaffSignupOtherTextCount) Decode

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

Decode decodes StaffSignupOtherTextCount from json.

func (*StaffSignupOtherTextCount) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupOtherTextCount) GetCount

func (s *StaffSignupOtherTextCount) GetCount() int32

GetCount returns the value of Count.

func (*StaffSignupOtherTextCount) GetText

func (s *StaffSignupOtherTextCount) GetText() string

GetText returns the value of Text.

func (*StaffSignupOtherTextCount) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupOtherTextCount) SetCount

func (s *StaffSignupOtherTextCount) SetCount(val int32)

SetCount sets the value of Count.

func (*StaffSignupOtherTextCount) SetText

func (s *StaffSignupOtherTextCount) SetText(val string)

SetText sets the value of Text.

func (*StaffSignupOtherTextCount) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type StaffSignupRole

type StaffSignupRole string

What the User does (Sign-up survey, first question). Ref: #/components/schemas/StaffSignupRole

const (
	StaffSignupRoleFounder   StaffSignupRole = "founder"
	StaffSignupRoleMarketer  StaffSignupRole = "marketer"
	StaffSignupRoleDeveloper StaffSignupRole = "developer"
	StaffSignupRoleProduct   StaffSignupRole = "product"
	StaffSignupRoleOther     StaffSignupRole = "other"
)

func (StaffSignupRole) AllValues

func (StaffSignupRole) AllValues() []StaffSignupRole

AllValues returns all StaffSignupRole values.

func (*StaffSignupRole) Decode

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

Decode decodes StaffSignupRole from json.

func (StaffSignupRole) Encode

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

Encode encodes StaffSignupRole as json.

func (StaffSignupRole) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffSignupRole) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffSignupRole) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupRole) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffSignupRole) Validate

func (s StaffSignupRole) Validate() error

type StaffSignupRoleCount

type StaffSignupRoleCount struct {
	Choice StaffSignupRole `json:"choice"`
	Count  int32           `json:"count"`
}

How many Users chose a role. Ref: #/components/schemas/StaffSignupRoleCount

func (*StaffSignupRoleCount) Decode

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

Decode decodes StaffSignupRoleCount from json.

func (*StaffSignupRoleCount) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupRoleCount) GetChoice

func (s *StaffSignupRoleCount) GetChoice() StaffSignupRole

GetChoice returns the value of Choice.

func (*StaffSignupRoleCount) GetCount

func (s *StaffSignupRoleCount) GetCount() int32

GetCount returns the value of Count.

func (*StaffSignupRoleCount) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupRoleCount) SetChoice

func (s *StaffSignupRoleCount) SetChoice(val StaffSignupRole)

SetChoice sets the value of Choice.

func (*StaffSignupRoleCount) SetCount

func (s *StaffSignupRoleCount) SetCount(val int32)

SetCount sets the value of Count.

func (*StaffSignupRoleCount) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupRoleCount) Validate

func (s *StaffSignupRoleCount) Validate() error

type StaffSignupSource

type StaffSignupSource string

Where the User heard about the product (fourth question, optional). Ref: #/components/schemas/StaffSignupSource

const (
	StaffSignupSourceSearch         StaffSignupSource = "search"
	StaffSignupSourceGithub         StaffSignupSource = "github"
	StaffSignupSourceSocial         StaffSignupSource = "social"
	StaffSignupSourceRecommendation StaffSignupSource = "recommendation"
	StaffSignupSourceOther          StaffSignupSource = "other"
)

func (StaffSignupSource) AllValues

func (StaffSignupSource) AllValues() []StaffSignupSource

AllValues returns all StaffSignupSource values.

func (*StaffSignupSource) Decode

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

Decode decodes StaffSignupSource from json.

func (StaffSignupSource) Encode

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

Encode encodes StaffSignupSource as json.

func (StaffSignupSource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffSignupSource) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffSignupSource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSource) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffSignupSource) Validate

func (s StaffSignupSource) Validate() error

type StaffSignupSourceCount

type StaffSignupSourceCount struct {
	Choice StaffSignupSource `json:"choice"`
	Count  int32             `json:"count"`
}

How many Users chose a source. Ref: #/components/schemas/StaffSignupSourceCount

func (*StaffSignupSourceCount) Decode

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

Decode decodes StaffSignupSourceCount from json.

func (*StaffSignupSourceCount) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupSourceCount) GetChoice

GetChoice returns the value of Choice.

func (*StaffSignupSourceCount) GetCount

func (s *StaffSignupSourceCount) GetCount() int32

GetCount returns the value of Count.

func (*StaffSignupSourceCount) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupSourceCount) SetChoice

func (s *StaffSignupSourceCount) SetChoice(val StaffSignupSource)

SetChoice sets the value of Choice.

func (*StaffSignupSourceCount) SetCount

func (s *StaffSignupSourceCount) SetCount(val int32)

SetCount sets the value of Count.

func (*StaffSignupSourceCount) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSourceCount) Validate

func (s *StaffSignupSourceCount) Validate() error

type StaffSignupSurveyCounts

type StaffSignupSurveyCounts struct {
	// How many Users answered the survey.
	Responses             int32                         `json:"responses"`
	Role                  []StaffSignupRoleCount        `json:"role"`
	RoleOtherTexts        []StaffSignupOtherTextCount   `json:"roleOtherTexts"`
	CompanySize           []StaffSignupCompanySizeCount `json:"companySize"`
	CompanySizeOtherTexts []StaffSignupOtherTextCount   `json:"companySizeOtherTexts"`
	MainGoal              []StaffSignupGoalCount        `json:"mainGoal"`
	MainGoalOtherTexts    []StaffSignupOtherTextCount   `json:"mainGoalOtherTexts"`
	// Only the Users who answered the optional question are counted.
	HeardFrom           []StaffSignupSourceCount    `json:"heardFrom"`
	HeardFromOtherTexts []StaffSignupOtherTextCount `json:"heardFromOtherTexts"`
}

The Sign-up survey answers of every User who answered, counted per question. A choice nobody made is absent from its list; a question's `other` texts are listed with their counts, most frequent first. Ref: #/components/schemas/StaffSignupSurveyCounts

func (*StaffSignupSurveyCounts) Decode

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

Decode decodes StaffSignupSurveyCounts from json.

func (*StaffSignupSurveyCounts) Encode

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

Encode implements json.Marshaler.

func (*StaffSignupSurveyCounts) GetCompanySize

GetCompanySize returns the value of CompanySize.

func (*StaffSignupSurveyCounts) GetCompanySizeOtherTexts

func (s *StaffSignupSurveyCounts) GetCompanySizeOtherTexts() []StaffSignupOtherTextCount

GetCompanySizeOtherTexts returns the value of CompanySizeOtherTexts.

func (*StaffSignupSurveyCounts) GetHeardFrom

func (s *StaffSignupSurveyCounts) GetHeardFrom() []StaffSignupSourceCount

GetHeardFrom returns the value of HeardFrom.

func (*StaffSignupSurveyCounts) GetHeardFromOtherTexts

func (s *StaffSignupSurveyCounts) GetHeardFromOtherTexts() []StaffSignupOtherTextCount

GetHeardFromOtherTexts returns the value of HeardFromOtherTexts.

func (*StaffSignupSurveyCounts) GetMainGoal

func (s *StaffSignupSurveyCounts) GetMainGoal() []StaffSignupGoalCount

GetMainGoal returns the value of MainGoal.

func (*StaffSignupSurveyCounts) GetMainGoalOtherTexts

func (s *StaffSignupSurveyCounts) GetMainGoalOtherTexts() []StaffSignupOtherTextCount

GetMainGoalOtherTexts returns the value of MainGoalOtherTexts.

func (*StaffSignupSurveyCounts) GetResponses

func (s *StaffSignupSurveyCounts) GetResponses() int32

GetResponses returns the value of Responses.

func (*StaffSignupSurveyCounts) GetRole

GetRole returns the value of Role.

func (*StaffSignupSurveyCounts) GetRoleOtherTexts

func (s *StaffSignupSurveyCounts) GetRoleOtherTexts() []StaffSignupOtherTextCount

GetRoleOtherTexts returns the value of RoleOtherTexts.

func (*StaffSignupSurveyCounts) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupSurveyCounts) SetCompanySize

func (s *StaffSignupSurveyCounts) SetCompanySize(val []StaffSignupCompanySizeCount)

SetCompanySize sets the value of CompanySize.

func (*StaffSignupSurveyCounts) SetCompanySizeOtherTexts

func (s *StaffSignupSurveyCounts) SetCompanySizeOtherTexts(val []StaffSignupOtherTextCount)

SetCompanySizeOtherTexts sets the value of CompanySizeOtherTexts.

func (*StaffSignupSurveyCounts) SetHeardFrom

func (s *StaffSignupSurveyCounts) SetHeardFrom(val []StaffSignupSourceCount)

SetHeardFrom sets the value of HeardFrom.

func (*StaffSignupSurveyCounts) SetHeardFromOtherTexts

func (s *StaffSignupSurveyCounts) SetHeardFromOtherTexts(val []StaffSignupOtherTextCount)

SetHeardFromOtherTexts sets the value of HeardFromOtherTexts.

func (*StaffSignupSurveyCounts) SetMainGoal

func (s *StaffSignupSurveyCounts) SetMainGoal(val []StaffSignupGoalCount)

SetMainGoal sets the value of MainGoal.

func (*StaffSignupSurveyCounts) SetMainGoalOtherTexts

func (s *StaffSignupSurveyCounts) SetMainGoalOtherTexts(val []StaffSignupOtherTextCount)

SetMainGoalOtherTexts sets the value of MainGoalOtherTexts.

func (*StaffSignupSurveyCounts) SetResponses

func (s *StaffSignupSurveyCounts) SetResponses(val int32)

SetResponses sets the value of Responses.

func (*StaffSignupSurveyCounts) SetRole

SetRole sets the value of Role.

func (*StaffSignupSurveyCounts) SetRoleOtherTexts

func (s *StaffSignupSurveyCounts) SetRoleOtherTexts(val []StaffSignupOtherTextCount)

SetRoleOtherTexts sets the value of RoleOtherTexts.

func (*StaffSignupSurveyCounts) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSurveyCounts) Validate

func (s *StaffSignupSurveyCounts) Validate() error

type StaffSignupSurveyCountsRes

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

type StaffSignupSurveyGetNotFound

type StaffSignupSurveyGetNotFound ProblemDetails

func (*StaffSignupSurveyGetNotFound) Decode

Decode decodes StaffSignupSurveyGetNotFound from json.

func (*StaffSignupSurveyGetNotFound) Encode

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

Encode encodes StaffSignupSurveyGetNotFound as json.

func (*StaffSignupSurveyGetNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupSurveyGetNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSurveyGetNotFound) Validate

func (s *StaffSignupSurveyGetNotFound) Validate() error

type StaffSignupSurveyGetParams

type StaffSignupSurveyGetParams struct {
	UserId EntityId
}

StaffSignupSurveyGetParams is parameters of StaffSignupSurvey_get operation.

type StaffSignupSurveyGetRes

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

type StaffSignupSurveyGetUnauthorized

type StaffSignupSurveyGetUnauthorized ProblemDetails

func (*StaffSignupSurveyGetUnauthorized) Decode

Decode decodes StaffSignupSurveyGetUnauthorized from json.

func (*StaffSignupSurveyGetUnauthorized) Encode

Encode encodes StaffSignupSurveyGetUnauthorized as json.

func (*StaffSignupSurveyGetUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupSurveyGetUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSurveyGetUnauthorized) Validate

type StaffSignupSurveyResponseResource

type StaffSignupSurveyResponseResource struct {
	// The answering User's id.
	UserId EntityId `json:"userId"`
	// What the User does.
	Role StaffSignupRole `json:"role"`
	// What the User does, when `role` is `other`.
	RoleOtherText OptNilString `json:"roleOtherText"`
	// How many people work at the User's company.
	CompanySize StaffSignupCompanySize `json:"companySize"`
	// The company size, when `companySize` is `other`.
	CompanySizeOtherText OptNilString `json:"companySizeOtherText"`
	// What the User mainly wants to do with the product.
	MainGoal StaffSignupGoal `json:"mainGoal"`
	// The main goal, when `mainGoal` is `other`.
	MainGoalOtherText OptNilString `json:"mainGoalOtherText"`
	// Where the User heard about the product; absent when the optional question was skipped.
	HeardFrom OptNilStaffSignupSource `json:"heardFrom"`
	// Where the User heard about the product, when `heardFrom` is `other`.
	HeardFromOtherText OptNilString `json:"heardFromOtherText"`
	// When the User answered.
	AnsweredAt Timestamp `json:"answeredAt"`
}

One User's answers to the Sign-up survey. A User who has not answered has none. Ref: #/components/schemas/StaffSignupSurveyResponseResource

func (*StaffSignupSurveyResponseResource) Decode

Decode decodes StaffSignupSurveyResponseResource from json.

func (*StaffSignupSurveyResponseResource) Encode

Encode implements json.Marshaler.

func (*StaffSignupSurveyResponseResource) GetAnsweredAt

func (s *StaffSignupSurveyResponseResource) GetAnsweredAt() Timestamp

GetAnsweredAt returns the value of AnsweredAt.

func (*StaffSignupSurveyResponseResource) GetCompanySize

GetCompanySize returns the value of CompanySize.

func (*StaffSignupSurveyResponseResource) GetCompanySizeOtherText

func (s *StaffSignupSurveyResponseResource) GetCompanySizeOtherText() OptNilString

GetCompanySizeOtherText returns the value of CompanySizeOtherText.

func (*StaffSignupSurveyResponseResource) GetHeardFrom

GetHeardFrom returns the value of HeardFrom.

func (*StaffSignupSurveyResponseResource) GetHeardFromOtherText

func (s *StaffSignupSurveyResponseResource) GetHeardFromOtherText() OptNilString

GetHeardFromOtherText returns the value of HeardFromOtherText.

func (*StaffSignupSurveyResponseResource) GetMainGoal

GetMainGoal returns the value of MainGoal.

func (*StaffSignupSurveyResponseResource) GetMainGoalOtherText

func (s *StaffSignupSurveyResponseResource) GetMainGoalOtherText() OptNilString

GetMainGoalOtherText returns the value of MainGoalOtherText.

func (*StaffSignupSurveyResponseResource) GetRole

GetRole returns the value of Role.

func (*StaffSignupSurveyResponseResource) GetRoleOtherText

func (s *StaffSignupSurveyResponseResource) GetRoleOtherText() OptNilString

GetRoleOtherText returns the value of RoleOtherText.

func (*StaffSignupSurveyResponseResource) GetUserId

GetUserId returns the value of UserId.

func (*StaffSignupSurveyResponseResource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSignupSurveyResponseResource) SetAnsweredAt

func (s *StaffSignupSurveyResponseResource) SetAnsweredAt(val Timestamp)

SetAnsweredAt sets the value of AnsweredAt.

func (*StaffSignupSurveyResponseResource) SetCompanySize

SetCompanySize sets the value of CompanySize.

func (*StaffSignupSurveyResponseResource) SetCompanySizeOtherText

func (s *StaffSignupSurveyResponseResource) SetCompanySizeOtherText(val OptNilString)

SetCompanySizeOtherText sets the value of CompanySizeOtherText.

func (*StaffSignupSurveyResponseResource) SetHeardFrom

SetHeardFrom sets the value of HeardFrom.

func (*StaffSignupSurveyResponseResource) SetHeardFromOtherText

func (s *StaffSignupSurveyResponseResource) SetHeardFromOtherText(val OptNilString)

SetHeardFromOtherText sets the value of HeardFromOtherText.

func (*StaffSignupSurveyResponseResource) SetMainGoal

SetMainGoal sets the value of MainGoal.

func (*StaffSignupSurveyResponseResource) SetMainGoalOtherText

func (s *StaffSignupSurveyResponseResource) SetMainGoalOtherText(val OptNilString)

SetMainGoalOtherText sets the value of MainGoalOtherText.

func (*StaffSignupSurveyResponseResource) SetRole

SetRole sets the value of Role.

func (*StaffSignupSurveyResponseResource) SetRoleOtherText

func (s *StaffSignupSurveyResponseResource) SetRoleOtherText(val OptNilString)

SetRoleOtherText sets the value of RoleOtherText.

func (*StaffSignupSurveyResponseResource) SetUserId

func (s *StaffSignupSurveyResponseResource) SetUserId(val EntityId)

SetUserId sets the value of UserId.

func (*StaffSignupSurveyResponseResource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSignupSurveyResponseResource) Validate

type StaffSuspendInput

type StaffSuspendInput struct {
	// The reason, required: the Workspace owner is told why sending stopped.
	Reason string `json:"reason"`
}

Why a Workspace is being suspended; the owner is told. Ref: #/components/schemas/StaffSuspendInput

func (*StaffSuspendInput) Decode

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

Decode decodes StaffSuspendInput from json.

func (*StaffSuspendInput) Encode

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

Encode implements json.Marshaler.

func (*StaffSuspendInput) GetReason

func (s *StaffSuspendInput) GetReason() string

GetReason returns the value of Reason.

func (*StaffSuspendInput) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSuspendInput) SetReason

func (s *StaffSuspendInput) SetReason(val string)

SetReason sets the value of Reason.

func (*StaffSuspendInput) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSuspendInput) Validate

func (s *StaffSuspendInput) Validate() error

type StaffSuspension

type StaffSuspension struct {
	// When outbound sending was suspended.
	At Timestamp `json:"at"`
	// Who suspended it.
	Actor StaffSuspensionActor `json:"actor"`
	// Why, as given by the actor.
	Reason OptNilString `json:"reason"`
}

A Workspace's suspension state (ADR 0007). Ref: #/components/schemas/StaffSuspension

func (*StaffSuspension) Decode

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

Decode decodes StaffSuspension from json.

func (*StaffSuspension) Encode

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

Encode implements json.Marshaler.

func (*StaffSuspension) GetActor

func (s *StaffSuspension) GetActor() StaffSuspensionActor

GetActor returns the value of Actor.

func (*StaffSuspension) GetAt

func (s *StaffSuspension) GetAt() Timestamp

GetAt returns the value of At.

func (*StaffSuspension) GetReason

func (s *StaffSuspension) GetReason() OptNilString

GetReason returns the value of Reason.

func (*StaffSuspension) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSuspension) SetActor

func (s *StaffSuspension) SetActor(val StaffSuspensionActor)

SetActor sets the value of Actor.

func (*StaffSuspension) SetAt

func (s *StaffSuspension) SetAt(val Timestamp)

SetAt sets the value of At.

func (*StaffSuspension) SetReason

func (s *StaffSuspension) SetReason(val OptNilString)

SetReason sets the value of Reason.

func (*StaffSuspension) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSuspension) Validate

func (s *StaffSuspension) Validate() error

type StaffSuspensionActor

type StaffSuspensionActor struct {
	Kind StaffSuspensionActorKind `json:"kind"`
	// The Staff member id; present only for the `staff` kind.
	ID OptNilString `json:"id"`
}

The actor of a suspension. Unlike a customer, a Staff member sees the real Staff member id. Ref: #/components/schemas/StaffSuspensionActor

func (*StaffSuspensionActor) Decode

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

Decode decodes StaffSuspensionActor from json.

func (*StaffSuspensionActor) Encode

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

Encode implements json.Marshaler.

func (*StaffSuspensionActor) GetID

GetID returns the value of ID.

func (*StaffSuspensionActor) GetKind

GetKind returns the value of Kind.

func (*StaffSuspensionActor) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSuspensionActor) SetID

func (s *StaffSuspensionActor) SetID(val OptNilString)

SetID sets the value of ID.

func (*StaffSuspensionActor) SetKind

SetKind sets the value of Kind.

func (*StaffSuspensionActor) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSuspensionActor) Validate

func (s *StaffSuspensionActor) Validate() error

type StaffSuspensionActorKind

type StaffSuspensionActorKind string

Who set a Workspace suspension (ADR 0026). Ref: #/components/schemas/StaffSuspensionActorKind

const (
	StaffSuspensionActorKindSystem StaffSuspensionActorKind = "system"
	StaffSuspensionActorKindCli    StaffSuspensionActorKind = "cli"
	StaffSuspensionActorKindStaff  StaffSuspensionActorKind = "staff"
)

func (StaffSuspensionActorKind) AllValues

AllValues returns all StaffSuspensionActorKind values.

func (*StaffSuspensionActorKind) Decode

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

Decode decodes StaffSuspensionActorKind from json.

func (StaffSuspensionActorKind) Encode

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

Encode encodes StaffSuspensionActorKind as json.

func (StaffSuspensionActorKind) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (StaffSuspensionActorKind) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffSuspensionActorKind) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSuspensionActorKind) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffSuspensionActorKind) Validate

func (s StaffSuspensionActorKind) Validate() error

type StaffSuspensionChange

type StaffSuspensionChange struct {
	Changed   bool                   `json:"changed"`
	Workspace StaffWorkspaceResource `json:"workspace"`
}

The outcome of a suspend or unsuspend: the Workspace as it now stands, and whether anything changed (suspending a suspended Workspace and unsuspending an active one change nothing). Ref: #/components/schemas/StaffSuspensionChange

func (*StaffSuspensionChange) Decode

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

Decode decodes StaffSuspensionChange from json.

func (*StaffSuspensionChange) Encode

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

Encode implements json.Marshaler.

func (*StaffSuspensionChange) GetChanged

func (s *StaffSuspensionChange) GetChanged() bool

GetChanged returns the value of Changed.

func (*StaffSuspensionChange) GetWorkspace

GetWorkspace returns the value of Workspace.

func (*StaffSuspensionChange) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffSuspensionChange) SetChanged

func (s *StaffSuspensionChange) SetChanged(val bool)

SetChanged sets the value of Changed.

func (*StaffSuspensionChange) SetWorkspace

func (s *StaffSuspensionChange) SetWorkspace(val StaffWorkspaceResource)

SetWorkspace sets the value of Workspace.

func (*StaffSuspensionChange) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffSuspensionChange) Validate

func (s *StaffSuspensionChange) Validate() error

type StaffWorkspaceAuditListBadRequest

type StaffWorkspaceAuditListBadRequest ProblemDetails

func (*StaffWorkspaceAuditListBadRequest) Decode

Decode decodes StaffWorkspaceAuditListBadRequest from json.

func (*StaffWorkspaceAuditListBadRequest) Encode

Encode encodes StaffWorkspaceAuditListBadRequest as json.

func (*StaffWorkspaceAuditListBadRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspaceAuditListBadRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspaceAuditListBadRequest) Validate

type StaffWorkspaceAuditListNotFound

type StaffWorkspaceAuditListNotFound ProblemDetails

func (*StaffWorkspaceAuditListNotFound) Decode

Decode decodes StaffWorkspaceAuditListNotFound from json.

func (*StaffWorkspaceAuditListNotFound) Encode

Encode encodes StaffWorkspaceAuditListNotFound as json.

func (*StaffWorkspaceAuditListNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspaceAuditListNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspaceAuditListNotFound) Validate

func (s *StaffWorkspaceAuditListNotFound) Validate() error

type StaffWorkspaceAuditListParams

type StaffWorkspaceAuditListParams struct {
	WorkspaceId WorkspaceId
	// Cursor from a previous page.
	Cursor OptString `json:",omitempty,omitzero"`
	// Page size.
	Limit OptInt32 `json:",omitempty,omitzero"`
}

StaffWorkspaceAuditListParams is parameters of StaffWorkspaceAudit_list operation.

type StaffWorkspaceAuditListRes

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

type StaffWorkspaceAuditListUnauthorized

type StaffWorkspaceAuditListUnauthorized ProblemDetails

func (*StaffWorkspaceAuditListUnauthorized) Decode

Decode decodes StaffWorkspaceAuditListUnauthorized from json.

func (*StaffWorkspaceAuditListUnauthorized) Encode

Encode encodes StaffWorkspaceAuditListUnauthorized as json.

func (*StaffWorkspaceAuditListUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspaceAuditListUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspaceAuditListUnauthorized) Validate

type StaffWorkspaceDetailResource

type StaffWorkspaceDetailResource 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; present from deletion until a restore (ADR 0043).
	DiscardedAt OptNilTimestamp `json:"discardedAt"`
	// When the Workspace's data was erased; the row stays as a tombstone.
	ErasedAt OptNilTimestamp `json:"erasedAt"`
	// Present only while sending is suspended.
	Suspension OptNilStaffSuspension `json:"suspension"`
	// Exempt from the abuse detector (set by a Staff member).
	Exempt bool `json:"exempt"`
	// The owners were warned and the Workspace has not left the warning tier since.
	Warned bool `json:"warned"`
	// Active Staff holds by key; a lapsed hold is not listed.
	Holds          []StaffHold         `json:"holds"`
	Deliverability StaffDeliverability `json:"deliverability"`
	Abuse          StaffAbuse          `json:"abuse"`
}

A Workspace with its deliverability and active holds, as the detail page shows it. Ref: #/components/schemas/StaffWorkspaceDetailResource

func (*StaffWorkspaceDetailResource) Decode

Decode decodes StaffWorkspaceDetailResource from json.

func (*StaffWorkspaceDetailResource) Encode

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

Encode implements json.Marshaler.

func (*StaffWorkspaceDetailResource) GetAbuse

GetAbuse returns the value of Abuse.

func (*StaffWorkspaceDetailResource) GetCreatedAt

func (s *StaffWorkspaceDetailResource) GetCreatedAt() Timestamp

GetCreatedAt returns the value of CreatedAt.

func (*StaffWorkspaceDetailResource) GetDeliverability

func (s *StaffWorkspaceDetailResource) GetDeliverability() StaffDeliverability

GetDeliverability returns the value of Deliverability.

func (*StaffWorkspaceDetailResource) GetDiscardedAt

func (s *StaffWorkspaceDetailResource) GetDiscardedAt() OptNilTimestamp

GetDiscardedAt returns the value of DiscardedAt.

func (*StaffWorkspaceDetailResource) GetErasedAt

GetErasedAt returns the value of ErasedAt.

func (*StaffWorkspaceDetailResource) GetExempt

func (s *StaffWorkspaceDetailResource) GetExempt() bool

GetExempt returns the value of Exempt.

func (*StaffWorkspaceDetailResource) GetHolds

func (s *StaffWorkspaceDetailResource) GetHolds() []StaffHold

GetHolds returns the value of Holds.

func (*StaffWorkspaceDetailResource) GetID

GetID returns the value of ID.

func (*StaffWorkspaceDetailResource) GetName

func (s *StaffWorkspaceDetailResource) GetName() string

GetName returns the value of Name.

func (*StaffWorkspaceDetailResource) GetSuspension

GetSuspension returns the value of Suspension.

func (*StaffWorkspaceDetailResource) GetWarned

func (s *StaffWorkspaceDetailResource) GetWarned() bool

GetWarned returns the value of Warned.

func (*StaffWorkspaceDetailResource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspaceDetailResource) SetAbuse

func (s *StaffWorkspaceDetailResource) SetAbuse(val StaffAbuse)

SetAbuse sets the value of Abuse.

func (*StaffWorkspaceDetailResource) SetCreatedAt

func (s *StaffWorkspaceDetailResource) SetCreatedAt(val Timestamp)

SetCreatedAt sets the value of CreatedAt.

func (*StaffWorkspaceDetailResource) SetDeliverability

func (s *StaffWorkspaceDetailResource) SetDeliverability(val StaffDeliverability)

SetDeliverability sets the value of Deliverability.

func (*StaffWorkspaceDetailResource) SetDiscardedAt

func (s *StaffWorkspaceDetailResource) SetDiscardedAt(val OptNilTimestamp)

SetDiscardedAt sets the value of DiscardedAt.

func (*StaffWorkspaceDetailResource) SetErasedAt

func (s *StaffWorkspaceDetailResource) SetErasedAt(val OptNilTimestamp)

SetErasedAt sets the value of ErasedAt.

func (*StaffWorkspaceDetailResource) SetExempt

func (s *StaffWorkspaceDetailResource) SetExempt(val bool)

SetExempt sets the value of Exempt.

func (*StaffWorkspaceDetailResource) SetHolds

func (s *StaffWorkspaceDetailResource) SetHolds(val []StaffHold)

SetHolds sets the value of Holds.

func (*StaffWorkspaceDetailResource) SetID

SetID sets the value of ID.

func (*StaffWorkspaceDetailResource) SetName

func (s *StaffWorkspaceDetailResource) SetName(val string)

SetName sets the value of Name.

func (*StaffWorkspaceDetailResource) SetSuspension

SetSuspension sets the value of Suspension.

func (*StaffWorkspaceDetailResource) SetWarned

func (s *StaffWorkspaceDetailResource) SetWarned(val bool)

SetWarned sets the value of Warned.

func (*StaffWorkspaceDetailResource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspaceDetailResource) Validate

func (s *StaffWorkspaceDetailResource) Validate() error

type StaffWorkspaceResource

type StaffWorkspaceResource 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; present from deletion until a restore (ADR 0043).
	DiscardedAt OptNilTimestamp `json:"discardedAt"`
	// When the Workspace's data was erased; the row stays as a tombstone.
	ErasedAt OptNilTimestamp `json:"erasedAt"`
	// Present only while sending is suspended.
	Suspension OptNilStaffSuspension `json:"suspension"`
	// Exempt from the abuse detector (set by a Staff member).
	Exempt bool `json:"exempt"`
	// The owners were warned and the Workspace has not left the warning tier since.
	Warned bool `json:"warned"`
}

A Workspace as the Staff console sees it: metadata only, never Contacts, content or Events (ADR 0026). Ref: #/components/schemas/StaffWorkspaceResource

func (*StaffWorkspaceResource) Decode

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

Decode decodes StaffWorkspaceResource from json.

func (*StaffWorkspaceResource) Encode

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

Encode implements json.Marshaler.

func (*StaffWorkspaceResource) GetCreatedAt

func (s *StaffWorkspaceResource) GetCreatedAt() Timestamp

GetCreatedAt returns the value of CreatedAt.

func (*StaffWorkspaceResource) GetDiscardedAt

func (s *StaffWorkspaceResource) GetDiscardedAt() OptNilTimestamp

GetDiscardedAt returns the value of DiscardedAt.

func (*StaffWorkspaceResource) GetErasedAt

func (s *StaffWorkspaceResource) GetErasedAt() OptNilTimestamp

GetErasedAt returns the value of ErasedAt.

func (*StaffWorkspaceResource) GetExempt

func (s *StaffWorkspaceResource) GetExempt() bool

GetExempt returns the value of Exempt.

func (*StaffWorkspaceResource) GetID

GetID returns the value of ID.

func (*StaffWorkspaceResource) GetName

func (s *StaffWorkspaceResource) GetName() string

GetName returns the value of Name.

func (*StaffWorkspaceResource) GetSuspension

func (s *StaffWorkspaceResource) GetSuspension() OptNilStaffSuspension

GetSuspension returns the value of Suspension.

func (*StaffWorkspaceResource) GetWarned

func (s *StaffWorkspaceResource) GetWarned() bool

GetWarned returns the value of Warned.

func (*StaffWorkspaceResource) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspaceResource) SetCreatedAt

func (s *StaffWorkspaceResource) SetCreatedAt(val Timestamp)

SetCreatedAt sets the value of CreatedAt.

func (*StaffWorkspaceResource) SetDiscardedAt

func (s *StaffWorkspaceResource) SetDiscardedAt(val OptNilTimestamp)

SetDiscardedAt sets the value of DiscardedAt.

func (*StaffWorkspaceResource) SetErasedAt

func (s *StaffWorkspaceResource) SetErasedAt(val OptNilTimestamp)

SetErasedAt sets the value of ErasedAt.

func (*StaffWorkspaceResource) SetExempt

func (s *StaffWorkspaceResource) SetExempt(val bool)

SetExempt sets the value of Exempt.

func (*StaffWorkspaceResource) SetID

func (s *StaffWorkspaceResource) SetID(val WorkspaceId)

SetID sets the value of ID.

func (*StaffWorkspaceResource) SetName

func (s *StaffWorkspaceResource) SetName(val string)

SetName sets the value of Name.

func (*StaffWorkspaceResource) SetSuspension

func (s *StaffWorkspaceResource) SetSuspension(val OptNilStaffSuspension)

SetSuspension sets the value of Suspension.

func (*StaffWorkspaceResource) SetWarned

func (s *StaffWorkspaceResource) SetWarned(val bool)

SetWarned sets the value of Warned.

func (*StaffWorkspaceResource) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspaceResource) Validate

func (s *StaffWorkspaceResource) Validate() error

type StaffWorkspaceReview

type StaffWorkspaceReview string

Which Workspaces the list surfaces for review. Ref: #/components/schemas/StaffWorkspaceReview

const (
	StaffWorkspaceReviewWarned       StaffWorkspaceReview = "warned"
	StaffWorkspaceReviewSystemFrozen StaffWorkspaceReview = "systemFrozen"
	StaffWorkspaceReviewDeleted      StaffWorkspaceReview = "deleted"
)

func (StaffWorkspaceReview) AllValues

AllValues returns all StaffWorkspaceReview values.

func (StaffWorkspaceReview) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*StaffWorkspaceReview) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (StaffWorkspaceReview) Validate

func (s StaffWorkspaceReview) Validate() error

type StaffWorkspacesExemptNotFound

type StaffWorkspacesExemptNotFound ProblemDetails

func (*StaffWorkspacesExemptNotFound) Decode

Decode decodes StaffWorkspacesExemptNotFound from json.

func (*StaffWorkspacesExemptNotFound) Encode

Encode encodes StaffWorkspacesExemptNotFound as json.

func (*StaffWorkspacesExemptNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesExemptNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesExemptNotFound) Validate

func (s *StaffWorkspacesExemptNotFound) Validate() error

type StaffWorkspacesExemptParams

type StaffWorkspacesExemptParams struct {
	WorkspaceId WorkspaceId
}

StaffWorkspacesExemptParams is parameters of StaffWorkspaces_exempt operation.

type StaffWorkspacesExemptRes

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

type StaffWorkspacesExemptUnauthorized

type StaffWorkspacesExemptUnauthorized ProblemDetails

func (*StaffWorkspacesExemptUnauthorized) Decode

Decode decodes StaffWorkspacesExemptUnauthorized from json.

func (*StaffWorkspacesExemptUnauthorized) Encode

Encode encodes StaffWorkspacesExemptUnauthorized as json.

func (*StaffWorkspacesExemptUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesExemptUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesExemptUnauthorized) Validate

type StaffWorkspacesGetNotFound

type StaffWorkspacesGetNotFound ProblemDetails

func (*StaffWorkspacesGetNotFound) Decode

Decode decodes StaffWorkspacesGetNotFound from json.

func (*StaffWorkspacesGetNotFound) Encode

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

Encode encodes StaffWorkspacesGetNotFound as json.

func (*StaffWorkspacesGetNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesGetNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesGetNotFound) Validate

func (s *StaffWorkspacesGetNotFound) Validate() error

type StaffWorkspacesGetParams

type StaffWorkspacesGetParams struct {
	WorkspaceId WorkspaceId
}

StaffWorkspacesGetParams is parameters of StaffWorkspaces_get operation.

type StaffWorkspacesGetRes

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

type StaffWorkspacesGetUnauthorized

type StaffWorkspacesGetUnauthorized ProblemDetails

func (*StaffWorkspacesGetUnauthorized) Decode

Decode decodes StaffWorkspacesGetUnauthorized from json.

func (*StaffWorkspacesGetUnauthorized) Encode

Encode encodes StaffWorkspacesGetUnauthorized as json.

func (*StaffWorkspacesGetUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesGetUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesGetUnauthorized) Validate

func (s *StaffWorkspacesGetUnauthorized) Validate() error

type StaffWorkspacesListOK

type StaffWorkspacesListOK struct {
	// List of items.
	Items []StaffWorkspaceResource `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 (*StaffWorkspacesListOK) Decode

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

Decode decodes StaffWorkspacesListOK from json.

func (*StaffWorkspacesListOK) Encode

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

Encode implements json.Marshaler.

func (*StaffWorkspacesListOK) GetItems

GetItems returns the value of Items.

func (*StaffWorkspacesListOK) GetPage

func (s *StaffWorkspacesListOK) GetPage() int32

GetPage returns the value of Page.

func (*StaffWorkspacesListOK) GetPageSize

func (s *StaffWorkspacesListOK) GetPageSize() int32

GetPageSize returns the value of PageSize.

func (*StaffWorkspacesListOK) GetTotalItems

func (s *StaffWorkspacesListOK) GetTotalItems() int32

GetTotalItems returns the value of TotalItems.

func (*StaffWorkspacesListOK) GetTotalPages

func (s *StaffWorkspacesListOK) GetTotalPages() int32

GetTotalPages returns the value of TotalPages.

func (*StaffWorkspacesListOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesListOK) SetItems

func (s *StaffWorkspacesListOK) SetItems(val []StaffWorkspaceResource)

SetItems sets the value of Items.

func (*StaffWorkspacesListOK) SetPage

func (s *StaffWorkspacesListOK) SetPage(val int32)

SetPage sets the value of Page.

func (*StaffWorkspacesListOK) SetPageSize

func (s *StaffWorkspacesListOK) SetPageSize(val int32)

SetPageSize sets the value of PageSize.

func (*StaffWorkspacesListOK) SetTotalItems

func (s *StaffWorkspacesListOK) SetTotalItems(val int32)

SetTotalItems sets the value of TotalItems.

func (*StaffWorkspacesListOK) SetTotalPages

func (s *StaffWorkspacesListOK) SetTotalPages(val int32)

SetTotalPages sets the value of TotalPages.

func (*StaffWorkspacesListOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesListOK) Validate

func (s *StaffWorkspacesListOK) Validate() error

type StaffWorkspacesListParams

type StaffWorkspacesListParams struct {
	// Only Workspaces in this review state.
	Review OptStaffWorkspaceReview `json:",omitempty,omitzero"`
	// Only Workspaces whose id or name contains this text; the name matches case-insensitively, the id
	// exactly.
	Search OptString `json:",omitempty,omitzero"`
	// Page number (1-based).
	Page OptInt32 `json:",omitempty,omitzero"`
	// Page size.
	PageSize OptInt32 `json:",omitempty,omitzero"`
}

StaffWorkspacesListParams is parameters of StaffWorkspaces_list operation.

type StaffWorkspacesListRes

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

type StaffWorkspacesSuspendNotFound

type StaffWorkspacesSuspendNotFound ProblemDetails

func (*StaffWorkspacesSuspendNotFound) Decode

Decode decodes StaffWorkspacesSuspendNotFound from json.

func (*StaffWorkspacesSuspendNotFound) Encode

Encode encodes StaffWorkspacesSuspendNotFound as json.

func (*StaffWorkspacesSuspendNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesSuspendNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesSuspendNotFound) Validate

func (s *StaffWorkspacesSuspendNotFound) Validate() error

type StaffWorkspacesSuspendParams

type StaffWorkspacesSuspendParams struct {
	WorkspaceId WorkspaceId
}

StaffWorkspacesSuspendParams is parameters of StaffWorkspaces_suspend operation.

type StaffWorkspacesSuspendRes

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

type StaffWorkspacesSuspendUnauthorized

type StaffWorkspacesSuspendUnauthorized ProblemDetails

func (*StaffWorkspacesSuspendUnauthorized) Decode

Decode decodes StaffWorkspacesSuspendUnauthorized from json.

func (*StaffWorkspacesSuspendUnauthorized) Encode

Encode encodes StaffWorkspacesSuspendUnauthorized as json.

func (*StaffWorkspacesSuspendUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesSuspendUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesSuspendUnauthorized) Validate

type StaffWorkspacesSuspendUnprocessableEntity

type StaffWorkspacesSuspendUnprocessableEntity ProblemDetails

func (*StaffWorkspacesSuspendUnprocessableEntity) Decode

Decode decodes StaffWorkspacesSuspendUnprocessableEntity from json.

func (*StaffWorkspacesSuspendUnprocessableEntity) Encode

Encode encodes StaffWorkspacesSuspendUnprocessableEntity as json.

func (*StaffWorkspacesSuspendUnprocessableEntity) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesSuspendUnprocessableEntity) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesSuspendUnprocessableEntity) Validate

type StaffWorkspacesUnexemptNotFound

type StaffWorkspacesUnexemptNotFound ProblemDetails

func (*StaffWorkspacesUnexemptNotFound) Decode

Decode decodes StaffWorkspacesUnexemptNotFound from json.

func (*StaffWorkspacesUnexemptNotFound) Encode

Encode encodes StaffWorkspacesUnexemptNotFound as json.

func (*StaffWorkspacesUnexemptNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesUnexemptNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesUnexemptNotFound) Validate

func (s *StaffWorkspacesUnexemptNotFound) Validate() error

type StaffWorkspacesUnexemptParams

type StaffWorkspacesUnexemptParams struct {
	WorkspaceId WorkspaceId
}

StaffWorkspacesUnexemptParams is parameters of StaffWorkspaces_unexempt operation.

type StaffWorkspacesUnexemptRes

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

type StaffWorkspacesUnexemptUnauthorized

type StaffWorkspacesUnexemptUnauthorized ProblemDetails

func (*StaffWorkspacesUnexemptUnauthorized) Decode

Decode decodes StaffWorkspacesUnexemptUnauthorized from json.

func (*StaffWorkspacesUnexemptUnauthorized) Encode

Encode encodes StaffWorkspacesUnexemptUnauthorized as json.

func (*StaffWorkspacesUnexemptUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesUnexemptUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesUnexemptUnauthorized) Validate

type StaffWorkspacesUnsuspendNotFound

type StaffWorkspacesUnsuspendNotFound ProblemDetails

func (*StaffWorkspacesUnsuspendNotFound) Decode

Decode decodes StaffWorkspacesUnsuspendNotFound from json.

func (*StaffWorkspacesUnsuspendNotFound) Encode

Encode encodes StaffWorkspacesUnsuspendNotFound as json.

func (*StaffWorkspacesUnsuspendNotFound) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesUnsuspendNotFound) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesUnsuspendNotFound) Validate

type StaffWorkspacesUnsuspendParams

type StaffWorkspacesUnsuspendParams struct {
	WorkspaceId WorkspaceId
}

StaffWorkspacesUnsuspendParams is parameters of StaffWorkspaces_unsuspend operation.

type StaffWorkspacesUnsuspendRes

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

type StaffWorkspacesUnsuspendUnauthorized

type StaffWorkspacesUnsuspendUnauthorized ProblemDetails

func (*StaffWorkspacesUnsuspendUnauthorized) Decode

Decode decodes StaffWorkspacesUnsuspendUnauthorized from json.

func (*StaffWorkspacesUnsuspendUnauthorized) Encode

Encode encodes StaffWorkspacesUnsuspendUnauthorized as json.

func (*StaffWorkspacesUnsuspendUnauthorized) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*StaffWorkspacesUnsuspendUnauthorized) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StaffWorkspacesUnsuspendUnauthorized) 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) StaffAuthLogin

StaffAuthLogin implements StaffAuth_login operation.

Check the password. Answers a challenge (or, at first login, a TOTP enrolment) and never a session. Unknown email and wrong password answer the same 401.

POST /auth/login

func (UnimplementedHandler) StaffAuthLogout

func (UnimplementedHandler) StaffAuthLogout(ctx context.Context) (r StaffAuthLogoutRes, _ error)

StaffAuthLogout implements StaffAuth_logout operation.

End the session: bumps the Staff member's session epoch, so every session token of the Staff member (a copied one too) stops verifying, and clears the session cookie.

POST /auth/logout

func (UnimplementedHandler) StaffAuthSecondFactor

StaffAuthSecondFactor implements StaffAuth_secondFactor operation.

The second login step: verify the challenge and a TOTP code, then start the session (the cookie is set here). At first login the code also confirms the enrolment. An expired, reused or forged challenge and a wrong code answer the same 401.

POST /auth/second-factor

func (UnimplementedHandler) StaffMeGet

func (UnimplementedHandler) StaffMeGet(ctx context.Context) (r StaffMeGetRes, _ error)

StaffMeGet implements StaffMe_get operation.

The authenticated Staff member.

GET /me

func (UnimplementedHandler) StaffSignupSurveyCounts

func (UnimplementedHandler) StaffSignupSurveyCounts(ctx context.Context) (r StaffSignupSurveyCountsRes, _ error)

StaffSignupSurveyCounts implements StaffSignupSurvey_counts operation.

The Sign-up survey answers, counted per question. Read only.

GET /signup-survey

func (UnimplementedHandler) StaffSignupSurveyGet

StaffSignupSurveyGet implements StaffSignupSurvey_get operation.

One User's answers. 404 when the User is unknown or has not answered the survey.

GET /signup-survey/users/{userId}

func (UnimplementedHandler) StaffWorkspaceAuditList

StaffWorkspaceAuditList implements StaffWorkspaceAudit_list operation.

One Workspace's Audit log, newest first. Empty when the instance has no Audit license, since nothing is then recorded.

GET /workspaces/{workspaceId}/audit-entries

func (UnimplementedHandler) StaffWorkspacesExempt

StaffWorkspacesExempt implements StaffWorkspaces_exempt operation.

Exempt a Workspace from the abuse detector (ADR 0026): it is neither warned nor frozen automatically, but stays listed with its rates and can still be suspended by hand. Audited. Idempotent.

POST /workspaces/{workspaceId}/exempt

func (UnimplementedHandler) StaffWorkspacesGet

StaffWorkspacesGet implements StaffWorkspaces_get operation.

One Workspace's metadata, suspension state, rates and send volume.

GET /workspaces/{workspaceId}

func (UnimplementedHandler) StaffWorkspacesList

StaffWorkspacesList implements StaffWorkspaces_list operation.

List all Workspaces, newest first, optionally narrowed by an id or name search.

GET /workspaces

func (UnimplementedHandler) StaffWorkspacesSuspend

StaffWorkspacesSuspend implements StaffWorkspaces_suspend operation.

Suspend a Workspace's outbound sending (ADR 0007) with a required reason, as the signed-in Staff member. Idempotent: an already-suspended Workspace is left as it was.

POST /workspaces/{workspaceId}/suspend

func (UnimplementedHandler) StaffWorkspacesUnexempt

StaffWorkspacesUnexempt implements StaffWorkspaces_unexempt operation.

Police a Workspace by the abuse detector again. Audited. Idempotent.

POST /workspaces/{workspaceId}/unexempt

func (UnimplementedHandler) StaffWorkspacesUnsuspend

StaffWorkspacesUnsuspend implements StaffWorkspaces_unsuspend operation.

Lift a Workspace's suspension; held sends resume. Idempotent: a Workspace that is not suspended is left as it was.

POST /workspaces/{workspaceId}/unsuspend

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

Jump to

Keyboard shortcuts

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