Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.2 DO NOT EDIT.
Index ¶
- Constants
- func GetSpec() (swagger *openapi3.T, err error)
- func GetSpecJSON() ([]byte, error)
- func GetSwagger() (*openapi3.T, error)deprecated
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RequestError(w http.ResponseWriter, _ *http.Request, _ error)
- func ResponseError(w http.ResponseWriter, _ *http.Request, _ error)
- type AcceptInviteLink201JSONResponse
- type AcceptInviteLink201ResponseHeaders
- type AcceptInviteLink400ApplicationProblemPlusJSONResponse
- type AcceptInviteLink401ApplicationProblemPlusJSONResponse
- type AcceptInviteLink403ApplicationProblemPlusJSONResponse
- type AcceptInviteLink404ApplicationProblemPlusJSONResponse
- type AcceptInviteLink409ApplicationProblemPlusJSONResponse
- type AcceptInviteLink410ApplicationProblemPlusJSONResponse
- type AcceptInviteLink500ApplicationProblemPlusJSONResponse
- type AcceptInviteLinkRequestObject
- type AcceptInviteLinkResponseObject
- type ActiveInviteLinkState
- type ActiveInviteLinkStateStatus
- type AlreadyMemberProblem
- type Code
- type CodeDelivery
- type CreateCode202JSONResponse
- type CreateCode400ApplicationProblemPlusJSONResponse
- type CreateCode429ApplicationProblemPlusJSONResponse
- type CreateCode429ResponseHeaders
- type CreateCode500ApplicationProblemPlusJSONResponse
- type CreateCodeJSONRequestBody
- type CreateCodeRequest
- type CreateCodeRequestObject
- type CreateCodeResponseObject
- type CreateIntroduction201JSONResponse
- type CreateIntroduction201ResponseHeaders
- type CreateIntroduction400ApplicationProblemPlusJSONResponse
- type CreateIntroduction401ApplicationProblemPlusJSONResponse
- type CreateIntroduction409ApplicationProblemPlusJSONResponse
- type CreateIntroduction500ApplicationProblemPlusJSONResponse
- type CreateIntroductionJSONRequestBody
- type CreateIntroductionRequest
- type CreateIntroductionRequestObject
- type CreateIntroductionResponseObject
- type CreateInviteLink201JSONResponse
- type CreateInviteLink201ResponseHeaders
- type CreateInviteLink400ApplicationProblemPlusJSONResponse
- type CreateInviteLink403ApplicationProblemPlusJSONResponse
- type CreateInviteLink500ApplicationProblemPlusJSONResponse
- type CreateInviteLinkJSONRequestBody
- type CreateInviteLinkRequest
- type CreateInviteLinkRequestObject
- type CreateInviteLinkResponseObject
- type CreateSession201JSONResponse
- type CreateSession201ResponseHeaders
- type CreateSession400ApplicationProblemPlusJSONResponse
- type CreateSession401ApplicationProblemPlusJSONResponse
- type CreateSession410ApplicationProblemPlusJSONResponse
- type CreateSession500ApplicationProblemPlusJSONResponse
- type CreateSessionJSONRequestBody
- type CreateSessionRequest
- type CreateSessionRequestObject
- type CreateSessionResponseObject
- type CreateTeam201JSONResponse
- type CreateTeam201ResponseHeaders
- type CreateTeam400ApplicationProblemPlusJSONResponse
- type CreateTeam401ApplicationProblemPlusJSONResponse
- type CreateTeam403ApplicationProblemPlusJSONResponse
- type CreateTeam500ApplicationProblemPlusJSONResponse
- type CreateTeamJSONRequestBody
- type CreateTeamRequest
- type CreateTeamRequestObject
- type CreateTeamResponseObject
- type DeleteSession204Response
- type DeleteSession401ApplicationProblemPlusJSONResponse
- type DeleteSession500ApplicationProblemPlusJSONResponse
- type DeleteSessionRequestObject
- type DeleteSessionResponseObject
- type Email
- type ExpiredInviteLinkState
- type ExpiredInviteLinkStateStatus
- type GetMe200JSONResponse
- type GetMe400ApplicationProblemPlusJSONResponse
- type GetMe401ApplicationProblemPlusJSONResponse
- type GetMe500ApplicationProblemPlusJSONResponse
- type GetMeRequestObject
- type GetMeResponseObject
- type GetTeam200JSONResponse
- type GetTeam400ApplicationProblemPlusJSONResponse
- type GetTeam403ApplicationProblemPlusJSONResponse
- type GetTeam404ApplicationProblemPlusJSONResponse
- type GetTeam500ApplicationProblemPlusJSONResponse
- type GetTeamRequestObject
- type GetTeamResponseObject
- type IntroducedUserState
- type IntroducedUserStateStatus
- type InvalidCodeProblem
- type InvalidParamFormatError
- type InviteLink
- type InviteLinkList
- type InviteLinkState
- func (t InviteLinkState) AsActiveInviteLinkState() (ActiveInviteLinkState, error)
- func (t InviteLinkState) AsExpiredInviteLinkState() (ExpiredInviteLinkState, error)
- func (t InviteLinkState) AsRevokedInviteLinkState() (RevokedInviteLinkState, error)
- func (t InviteLinkState) Discriminator() (string, error)
- func (t *InviteLinkState) FromActiveInviteLinkState(v ActiveInviteLinkState) error
- func (t *InviteLinkState) FromExpiredInviteLinkState(v ExpiredInviteLinkState) error
- func (t *InviteLinkState) FromRevokedInviteLinkState(v RevokedInviteLinkState) error
- func (t InviteLinkState) MarshalJSON() ([]byte, error)
- func (t *InviteLinkState) MergeActiveInviteLinkState(v ActiveInviteLinkState) error
- func (t *InviteLinkState) MergeExpiredInviteLinkState(v ExpiredInviteLinkState) error
- func (t *InviteLinkState) MergeRevokedInviteLinkState(v RevokedInviteLinkState) error
- func (t *InviteLinkState) UnmarshalJSON(b []byte) error
- func (t InviteLinkState) ValueByDiscriminator() (interface{}, error)
- type ListInviteLinks200JSONResponse
- type ListInviteLinks400ApplicationProblemPlusJSONResponse
- type ListInviteLinks403ApplicationProblemPlusJSONResponse
- type ListInviteLinks500ApplicationProblemPlusJSONResponse
- type ListInviteLinksParams
- type ListInviteLinksParamsStatus
- type ListInviteLinksRequestObject
- type ListInviteLinksResponseObject
- type ListMyTeams200JSONResponse
- type ListMyTeams400ApplicationProblemPlusJSONResponse
- type ListMyTeams403ApplicationProblemPlusJSONResponse
- type ListMyTeams500ApplicationProblemPlusJSONResponse
- type ListMyTeamsRequestObject
- type ListMyTeamsResponseObject
- type MiddlewareFunc
- type Pass
- type Problem
- type RefreshSession200JSONResponse
- type RefreshSession400ApplicationProblemPlusJSONResponse
- type RefreshSession401ApplicationProblemPlusJSONResponse
- type RefreshSession500ApplicationProblemPlusJSONResponse
- type RefreshSessionJSONRequestBody
- type RefreshSessionRequest
- type RefreshSessionRequestObject
- type RefreshSessionResponseObject
- type RequiredHeaderError
- type RequiredParamError
- type RevokeInviteLink204Response
- type RevokeInviteLink400ApplicationProblemPlusJSONResponse
- type RevokeInviteLink403ApplicationProblemPlusJSONResponse
- type RevokeInviteLink404ApplicationProblemPlusJSONResponse
- type RevokeInviteLink409ApplicationProblemPlusJSONResponse
- type RevokeInviteLink500ApplicationProblemPlusJSONResponse
- type RevokeInviteLinkRequestObject
- type RevokeInviteLinkResponseObject
- type RevokedInviteLinkState
- type RevokedInviteLinkStateStatus
- type Seal
- type ServeMux
- type Server
- func (s Server) AcceptInviteLink(ctx context.Context, req AcceptInviteLinkRequestObject) (AcceptInviteLinkResponseObject, error)
- func (s Server) CreateCode(ctx context.Context, req CreateCodeRequestObject) (CreateCodeResponseObject, error)
- func (s Server) CreateIntroduction(ctx context.Context, req CreateIntroductionRequestObject) (CreateIntroductionResponseObject, error)
- func (s Server) CreateInviteLink(ctx context.Context, req CreateInviteLinkRequestObject) (CreateInviteLinkResponseObject, error)
- func (s Server) CreateSession(ctx context.Context, req CreateSessionRequestObject) (CreateSessionResponseObject, error)
- func (s Server) CreateTeam(ctx context.Context, req CreateTeamRequestObject) (CreateTeamResponseObject, error)
- func (s Server) DeleteSession(ctx context.Context, _ DeleteSessionRequestObject) (DeleteSessionResponseObject, error)
- func (s Server) GetMe(ctx context.Context, req GetMeRequestObject) (GetMeResponseObject, error)
- func (s Server) GetTeam(ctx context.Context, req GetTeamRequestObject) (GetTeamResponseObject, error)
- func (s Server) ListInviteLinks(ctx context.Context, req ListInviteLinksRequestObject) (ListInviteLinksResponseObject, error)
- func (s Server) ListMyTeams(ctx context.Context, req ListMyTeamsRequestObject) (ListMyTeamsResponseObject, error)
- func (s Server) RefreshSession(ctx context.Context, req RefreshSessionRequestObject) (RefreshSessionResponseObject, error)
- func (s Server) RevokeInviteLink(ctx context.Context, req RevokeInviteLinkRequestObject) (RevokeInviteLinkResponseObject, error)
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AcceptInviteLink(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCode(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateIntroduction(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateInviteLink(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTeam(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTeam(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListInviteLinks(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMyTeams(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RefreshSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RevokeInviteLink(w http.ResponseWriter, r *http.Request)
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type Team
- type TeamList
- type TeamName
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnintroducedUserState
- type UnintroducedUserStateStatus
- type UnmarshalingParamError
- type User
- type UserState
- func (t UserState) AsIntroducedUserState() (IntroducedUserState, error)
- func (t UserState) AsUnintroducedUserState() (UnintroducedUserState, error)
- func (t UserState) Discriminator() (string, error)
- func (t *UserState) FromIntroducedUserState(v IntroducedUserState) error
- func (t *UserState) FromUnintroducedUserState(v UnintroducedUserState) error
- func (t UserState) MarshalJSON() ([]byte, error)
- func (t *UserState) MergeIntroducedUserState(v IntroducedUserState) error
- func (t *UserState) MergeUnintroducedUserState(v UnintroducedUserState) error
- func (t *UserState) UnmarshalJSON(b []byte) error
- func (t UserState) ValueByDiscriminator() (interface{}, error)
- type Username
Constants ¶
const (
BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSpec ¶
GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.
func GetSpecJSON ¶
GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.
func GetSwagger
deprecated
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RequestError ¶
func RequestError(w http.ResponseWriter, _ *http.Request, _ error)
RequestError is a StrictHTTPServerOptions.RequestErrorHandlerFunc. It runs for requests the strict handler rejects before Server sees them, e.g. a body that isn't valid JSON or that doesn't match the schema's types (a number where a string is expected).
func ResponseError ¶
func ResponseError(w http.ResponseWriter, _ *http.Request, _ error)
ResponseError is a StrictHTTPServerOptions.ResponseErrorHandlerFunc. It runs when a Server response can't be encoded.
Types ¶
type AcceptInviteLink201JSONResponse ¶
type AcceptInviteLink201JSONResponse struct {
Body Team
Headers AcceptInviteLink201ResponseHeaders
}
func (AcceptInviteLink201JSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink201JSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink201ResponseHeaders ¶
type AcceptInviteLink201ResponseHeaders struct {
Location *string
}
type AcceptInviteLink400ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink400ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink400ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink400ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink401ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink401ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink401ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink401ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink403ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink403ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink403ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink403ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink404ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink404ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink404ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink404ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink409ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink409ApplicationProblemPlusJSONResponse AlreadyMemberProblem
func (AcceptInviteLink409ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink409ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink410ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink410ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink410ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink410ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLink500ApplicationProblemPlusJSONResponse ¶
type AcceptInviteLink500ApplicationProblemPlusJSONResponse Problem
func (AcceptInviteLink500ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse ¶
func (response AcceptInviteLink500ApplicationProblemPlusJSONResponse) VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
type AcceptInviteLinkRequestObject ¶
type AcceptInviteLinkRequestObject struct {
Code string `json:"code"`
}
type AcceptInviteLinkResponseObject ¶
type AcceptInviteLinkResponseObject interface {
VisitAcceptInviteLinkResponse(w http.ResponseWriter) error
}
type ActiveInviteLinkState ¶
type ActiveInviteLinkState struct {
ExpiresAt *string `json:"expires_at"`
Status ActiveInviteLinkStateStatus `json:"status"`
}
ActiveInviteLinkState defines model for ActiveInviteLinkState.
type ActiveInviteLinkStateStatus ¶
type ActiveInviteLinkStateStatus string
ActiveInviteLinkStateStatus defines model for ActiveInviteLinkState.Status.
const (
ActiveInviteLinkStateStatusActive ActiveInviteLinkStateStatus = "active"
)
Defines values for ActiveInviteLinkStateStatus.
func (ActiveInviteLinkStateStatus) Valid ¶
func (e ActiveInviteLinkStateStatus) Valid() bool
Valid indicates whether the value is a known member of the ActiveInviteLinkStateStatus enum.
type AlreadyMemberProblem ¶
type AlreadyMemberProblem struct {
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
Status int `json:"status"`
TeamId string `json:"team_id"`
Title string `json:"title"`
Type *string `json:"type,omitempty"`
}
AlreadyMemberProblem defines model for AlreadyMemberProblem.
type CodeDelivery ¶
type CodeDelivery struct {
// ExpiresIn Seconds the code just sent will keep working.
ExpiresIn int `json:"expires_in"`
// RetryAfter Seconds before another code may be requested for this address.
RetryAfter int `json:"retry_after"`
}
CodeDelivery Says that a code was sent. It carries neither the code nor the address on purpose: the code belongs in the mailbox, and the address is what the caller has just supplied.
type CreateCode202JSONResponse ¶
type CreateCode202JSONResponse CodeDelivery
func (CreateCode202JSONResponse) VisitCreateCodeResponse ¶
func (response CreateCode202JSONResponse) VisitCreateCodeResponse(w http.ResponseWriter) error
type CreateCode400ApplicationProblemPlusJSONResponse ¶
type CreateCode400ApplicationProblemPlusJSONResponse Problem
func (CreateCode400ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse ¶
func (response CreateCode400ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse(w http.ResponseWriter) error
type CreateCode429ApplicationProblemPlusJSONResponse ¶
type CreateCode429ApplicationProblemPlusJSONResponse struct {
Body Problem
Headers CreateCode429ResponseHeaders
}
func (CreateCode429ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse ¶
func (response CreateCode429ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse(w http.ResponseWriter) error
type CreateCode429ResponseHeaders ¶
type CreateCode429ResponseHeaders struct {
RetryAfter *int
}
type CreateCode500ApplicationProblemPlusJSONResponse ¶
type CreateCode500ApplicationProblemPlusJSONResponse Problem
func (CreateCode500ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse ¶
func (response CreateCode500ApplicationProblemPlusJSONResponse) VisitCreateCodeResponse(w http.ResponseWriter) error
type CreateCodeJSONRequestBody ¶
type CreateCodeJSONRequestBody = CreateCodeRequest
CreateCodeJSONRequestBody defines body for CreateCode for application/json ContentType.
type CreateCodeRequest ¶
type CreateCodeRequest struct {
Email Email `json:"email"`
}
CreateCodeRequest defines model for CreateCodeRequest.
type CreateCodeRequestObject ¶
type CreateCodeRequestObject struct {
Body *CreateCodeJSONRequestBody
}
type CreateCodeResponseObject ¶
type CreateCodeResponseObject interface {
VisitCreateCodeResponse(w http.ResponseWriter) error
}
type CreateIntroduction201JSONResponse ¶
type CreateIntroduction201JSONResponse struct {
Body User
Headers CreateIntroduction201ResponseHeaders
}
func (CreateIntroduction201JSONResponse) VisitCreateIntroductionResponse ¶
func (response CreateIntroduction201JSONResponse) VisitCreateIntroductionResponse(w http.ResponseWriter) error
type CreateIntroduction201ResponseHeaders ¶
type CreateIntroduction201ResponseHeaders struct {
Location *string
}
type CreateIntroduction400ApplicationProblemPlusJSONResponse ¶
type CreateIntroduction400ApplicationProblemPlusJSONResponse Problem
func (CreateIntroduction400ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse ¶
func (response CreateIntroduction400ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse(w http.ResponseWriter) error
type CreateIntroduction401ApplicationProblemPlusJSONResponse ¶
type CreateIntroduction401ApplicationProblemPlusJSONResponse Problem
func (CreateIntroduction401ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse ¶
func (response CreateIntroduction401ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse(w http.ResponseWriter) error
type CreateIntroduction409ApplicationProblemPlusJSONResponse ¶
type CreateIntroduction409ApplicationProblemPlusJSONResponse Problem
func (CreateIntroduction409ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse ¶
func (response CreateIntroduction409ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse(w http.ResponseWriter) error
type CreateIntroduction500ApplicationProblemPlusJSONResponse ¶
type CreateIntroduction500ApplicationProblemPlusJSONResponse Problem
func (CreateIntroduction500ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse ¶
func (response CreateIntroduction500ApplicationProblemPlusJSONResponse) VisitCreateIntroductionResponse(w http.ResponseWriter) error
type CreateIntroductionJSONRequestBody ¶
type CreateIntroductionJSONRequestBody = CreateIntroductionRequest
CreateIntroductionJSONRequestBody defines body for CreateIntroduction for application/json ContentType.
type CreateIntroductionRequest ¶
type CreateIntroductionRequest struct {
// Username Lowercase letters, digits and underscores, 3 to 32 of them, never starting, ending or doubling on the underscore. The alphabet is narrow on purpose: a name that identifies can be impersonated by one that merely resembles it, and within a single script no two characters resemble each other closely enough. Capitals are refused rather than folded, so that one person has one spelling.
Username Username `json:"username"`
}
CreateIntroductionRequest defines model for CreateIntroductionRequest.
type CreateIntroductionRequestObject ¶
type CreateIntroductionRequestObject struct {
Body *CreateIntroductionJSONRequestBody
}
type CreateIntroductionResponseObject ¶
type CreateIntroductionResponseObject interface {
VisitCreateIntroductionResponse(w http.ResponseWriter) error
}
type CreateInviteLink201JSONResponse ¶
type CreateInviteLink201JSONResponse struct {
Body InviteLink
Headers CreateInviteLink201ResponseHeaders
}
func (CreateInviteLink201JSONResponse) VisitCreateInviteLinkResponse ¶
func (response CreateInviteLink201JSONResponse) VisitCreateInviteLinkResponse(w http.ResponseWriter) error
type CreateInviteLink201ResponseHeaders ¶
type CreateInviteLink201ResponseHeaders struct {
Location *string
}
type CreateInviteLink400ApplicationProblemPlusJSONResponse ¶
type CreateInviteLink400ApplicationProblemPlusJSONResponse Problem
func (CreateInviteLink400ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse ¶
func (response CreateInviteLink400ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse(w http.ResponseWriter) error
type CreateInviteLink403ApplicationProblemPlusJSONResponse ¶
type CreateInviteLink403ApplicationProblemPlusJSONResponse Problem
func (CreateInviteLink403ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse ¶
func (response CreateInviteLink403ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse(w http.ResponseWriter) error
type CreateInviteLink500ApplicationProblemPlusJSONResponse ¶
type CreateInviteLink500ApplicationProblemPlusJSONResponse Problem
func (CreateInviteLink500ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse ¶
func (response CreateInviteLink500ApplicationProblemPlusJSONResponse) VisitCreateInviteLinkResponse(w http.ResponseWriter) error
type CreateInviteLinkJSONRequestBody ¶
type CreateInviteLinkJSONRequestBody = CreateInviteLinkRequest
CreateInviteLinkJSONRequestBody defines body for CreateInviteLink for application/json ContentType.
type CreateInviteLinkRequest ¶
type CreateInviteLinkRequest struct {
ExpiresAt *string `json:"expires_at,omitempty"`
}
CreateInviteLinkRequest Omitting expires_at creates a link that never expires.
type CreateInviteLinkRequestObject ¶
type CreateInviteLinkRequestObject struct {
TeamId string `json:"team_id"`
Body *CreateInviteLinkJSONRequestBody
}
type CreateInviteLinkResponseObject ¶
type CreateInviteLinkResponseObject interface {
VisitCreateInviteLinkResponse(w http.ResponseWriter) error
}
type CreateSession201JSONResponse ¶
type CreateSession201JSONResponse struct {
Body Pass
Headers CreateSession201ResponseHeaders
}
func (CreateSession201JSONResponse) VisitCreateSessionResponse ¶
func (response CreateSession201JSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error
type CreateSession201ResponseHeaders ¶
type CreateSession201ResponseHeaders struct {
Location *string
}
type CreateSession400ApplicationProblemPlusJSONResponse ¶
type CreateSession400ApplicationProblemPlusJSONResponse Problem
func (CreateSession400ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse ¶
func (response CreateSession400ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error
type CreateSession401ApplicationProblemPlusJSONResponse ¶
type CreateSession401ApplicationProblemPlusJSONResponse InvalidCodeProblem
func (CreateSession401ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse ¶
func (response CreateSession401ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error
type CreateSession410ApplicationProblemPlusJSONResponse ¶
type CreateSession410ApplicationProblemPlusJSONResponse Problem
func (CreateSession410ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse ¶
func (response CreateSession410ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error
type CreateSession500ApplicationProblemPlusJSONResponse ¶
type CreateSession500ApplicationProblemPlusJSONResponse Problem
func (CreateSession500ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse ¶
func (response CreateSession500ApplicationProblemPlusJSONResponse) VisitCreateSessionResponse(w http.ResponseWriter) error
type CreateSessionJSONRequestBody ¶
type CreateSessionJSONRequestBody = CreateSessionRequest
CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.
type CreateSessionRequest ¶
CreateSessionRequest defines model for CreateSessionRequest.
type CreateSessionRequestObject ¶
type CreateSessionRequestObject struct {
Body *CreateSessionJSONRequestBody
}
type CreateSessionResponseObject ¶
type CreateSessionResponseObject interface {
VisitCreateSessionResponse(w http.ResponseWriter) error
}
type CreateTeam201JSONResponse ¶
type CreateTeam201JSONResponse struct {
Body Team
Headers CreateTeam201ResponseHeaders
}
func (CreateTeam201JSONResponse) VisitCreateTeamResponse ¶
func (response CreateTeam201JSONResponse) VisitCreateTeamResponse(w http.ResponseWriter) error
type CreateTeam201ResponseHeaders ¶
type CreateTeam201ResponseHeaders struct {
Location *string
}
type CreateTeam400ApplicationProblemPlusJSONResponse ¶
type CreateTeam400ApplicationProblemPlusJSONResponse Problem
func (CreateTeam400ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse ¶
func (response CreateTeam400ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse(w http.ResponseWriter) error
type CreateTeam401ApplicationProblemPlusJSONResponse ¶
type CreateTeam401ApplicationProblemPlusJSONResponse Problem
func (CreateTeam401ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse ¶
func (response CreateTeam401ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse(w http.ResponseWriter) error
type CreateTeam403ApplicationProblemPlusJSONResponse ¶
type CreateTeam403ApplicationProblemPlusJSONResponse Problem
func (CreateTeam403ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse ¶
func (response CreateTeam403ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse(w http.ResponseWriter) error
type CreateTeam500ApplicationProblemPlusJSONResponse ¶
type CreateTeam500ApplicationProblemPlusJSONResponse Problem
func (CreateTeam500ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse ¶
func (response CreateTeam500ApplicationProblemPlusJSONResponse) VisitCreateTeamResponse(w http.ResponseWriter) error
type CreateTeamJSONRequestBody ¶
type CreateTeamJSONRequestBody = CreateTeamRequest
CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType.
type CreateTeamRequest ¶
type CreateTeamRequest struct {
Name TeamName `json:"name"`
}
CreateTeamRequest defines model for CreateTeamRequest.
type CreateTeamRequestObject ¶
type CreateTeamRequestObject struct {
Body *CreateTeamJSONRequestBody
}
type CreateTeamResponseObject ¶
type CreateTeamResponseObject interface {
VisitCreateTeamResponse(w http.ResponseWriter) error
}
type DeleteSession204Response ¶
type DeleteSession204Response struct {
}
func (DeleteSession204Response) VisitDeleteSessionResponse ¶
func (response DeleteSession204Response) VisitDeleteSessionResponse(w http.ResponseWriter) error
type DeleteSession401ApplicationProblemPlusJSONResponse ¶
type DeleteSession401ApplicationProblemPlusJSONResponse Problem
func (DeleteSession401ApplicationProblemPlusJSONResponse) VisitDeleteSessionResponse ¶
func (response DeleteSession401ApplicationProblemPlusJSONResponse) VisitDeleteSessionResponse(w http.ResponseWriter) error
type DeleteSession500ApplicationProblemPlusJSONResponse ¶
type DeleteSession500ApplicationProblemPlusJSONResponse Problem
func (DeleteSession500ApplicationProblemPlusJSONResponse) VisitDeleteSessionResponse ¶
func (response DeleteSession500ApplicationProblemPlusJSONResponse) VisitDeleteSessionResponse(w http.ResponseWriter) error
type DeleteSessionRequestObject ¶
type DeleteSessionRequestObject struct {
}
type DeleteSessionResponseObject ¶
type DeleteSessionResponseObject interface {
VisitDeleteSessionResponse(w http.ResponseWriter) error
}
type ExpiredInviteLinkState ¶
type ExpiredInviteLinkState struct {
ExpiredAt string `json:"expired_at"`
Status ExpiredInviteLinkStateStatus `json:"status"`
}
ExpiredInviteLinkState defines model for ExpiredInviteLinkState.
type ExpiredInviteLinkStateStatus ¶
type ExpiredInviteLinkStateStatus string
ExpiredInviteLinkStateStatus defines model for ExpiredInviteLinkState.Status.
const (
Expired ExpiredInviteLinkStateStatus = "expired"
)
Defines values for ExpiredInviteLinkStateStatus.
func (ExpiredInviteLinkStateStatus) Valid ¶
func (e ExpiredInviteLinkStateStatus) Valid() bool
Valid indicates whether the value is a known member of the ExpiredInviteLinkStateStatus enum.
type GetMe200JSONResponse ¶
type GetMe200JSONResponse User
func (GetMe200JSONResponse) VisitGetMeResponse ¶
func (response GetMe200JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe400ApplicationProblemPlusJSONResponse ¶
type GetMe400ApplicationProblemPlusJSONResponse Problem
func (GetMe400ApplicationProblemPlusJSONResponse) VisitGetMeResponse ¶
func (response GetMe400ApplicationProblemPlusJSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe401ApplicationProblemPlusJSONResponse ¶
type GetMe401ApplicationProblemPlusJSONResponse Problem
func (GetMe401ApplicationProblemPlusJSONResponse) VisitGetMeResponse ¶
func (response GetMe401ApplicationProblemPlusJSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe500ApplicationProblemPlusJSONResponse ¶
type GetMe500ApplicationProblemPlusJSONResponse Problem
func (GetMe500ApplicationProblemPlusJSONResponse) VisitGetMeResponse ¶
func (response GetMe500ApplicationProblemPlusJSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMeRequestObject ¶
type GetMeRequestObject struct {
}
type GetMeResponseObject ¶
type GetMeResponseObject interface {
VisitGetMeResponse(w http.ResponseWriter) error
}
type GetTeam200JSONResponse ¶
type GetTeam200JSONResponse Team
func (GetTeam200JSONResponse) VisitGetTeamResponse ¶
func (response GetTeam200JSONResponse) VisitGetTeamResponse(w http.ResponseWriter) error
type GetTeam400ApplicationProblemPlusJSONResponse ¶
type GetTeam400ApplicationProblemPlusJSONResponse Problem
func (GetTeam400ApplicationProblemPlusJSONResponse) VisitGetTeamResponse ¶
func (response GetTeam400ApplicationProblemPlusJSONResponse) VisitGetTeamResponse(w http.ResponseWriter) error
type GetTeam403ApplicationProblemPlusJSONResponse ¶
type GetTeam403ApplicationProblemPlusJSONResponse Problem
func (GetTeam403ApplicationProblemPlusJSONResponse) VisitGetTeamResponse ¶
func (response GetTeam403ApplicationProblemPlusJSONResponse) VisitGetTeamResponse(w http.ResponseWriter) error
type GetTeam404ApplicationProblemPlusJSONResponse ¶
type GetTeam404ApplicationProblemPlusJSONResponse Problem
func (GetTeam404ApplicationProblemPlusJSONResponse) VisitGetTeamResponse ¶
func (response GetTeam404ApplicationProblemPlusJSONResponse) VisitGetTeamResponse(w http.ResponseWriter) error
type GetTeam500ApplicationProblemPlusJSONResponse ¶
type GetTeam500ApplicationProblemPlusJSONResponse Problem
func (GetTeam500ApplicationProblemPlusJSONResponse) VisitGetTeamResponse ¶
func (response GetTeam500ApplicationProblemPlusJSONResponse) VisitGetTeamResponse(w http.ResponseWriter) error
type GetTeamRequestObject ¶
type GetTeamRequestObject struct {
Id string `json:"id"`
}
type GetTeamResponseObject ¶
type GetTeamResponseObject interface {
VisitGetTeamResponse(w http.ResponseWriter) error
}
type IntroducedUserState ¶
type IntroducedUserState struct {
Status IntroducedUserStateStatus `json:"status"`
// Username Lowercase letters, digits and underscores, 3 to 32 of them, never starting, ending or doubling on the underscore. The alphabet is narrow on purpose: a name that identifies can be impersonated by one that merely resembles it, and within a single script no two characters resemble each other closely enough. Capitals are refused rather than folded, so that one person has one spelling.
Username Username `json:"username"`
}
IntroducedUserState defines model for IntroducedUserState.
type IntroducedUserStateStatus ¶
type IntroducedUserStateStatus string
IntroducedUserStateStatus defines model for IntroducedUserState.Status.
const (
Introduced IntroducedUserStateStatus = "introduced"
)
Defines values for IntroducedUserStateStatus.
func (IntroducedUserStateStatus) Valid ¶
func (e IntroducedUserStateStatus) Valid() bool
Valid indicates whether the value is a known member of the IntroducedUserStateStatus enum.
type InvalidCodeProblem ¶
type InvalidCodeProblem struct {
AttemptsLeft int `json:"attempts_left"`
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
Status int `json:"status"`
Title string `json:"title"`
Type *string `json:"type,omitempty"`
}
InvalidCodeProblem defines model for InvalidCodeProblem.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InviteLink ¶
type InviteLink struct {
Code string `json:"code"`
CreatedAt string `json:"created_at"`
State InviteLinkState `json:"state"`
UseCount int `json:"use_count"`
}
InviteLink defines model for InviteLink.
type InviteLinkList ¶
type InviteLinkList struct {
Items []InviteLink `json:"items"`
}
InviteLinkList Invite links in an object, for the same reason teams are: a team that has issued many of them will one day be answered a page at a time, and the room for saying so has to exist before it is needed.
type InviteLinkState ¶
type InviteLinkState struct {
// contains filtered or unexported fields
}
InviteLinkState defines model for InviteLinkState.
func (InviteLinkState) AsActiveInviteLinkState ¶
func (t InviteLinkState) AsActiveInviteLinkState() (ActiveInviteLinkState, error)
AsActiveInviteLinkState returns the union data inside the InviteLinkState as a ActiveInviteLinkState
func (InviteLinkState) AsExpiredInviteLinkState ¶
func (t InviteLinkState) AsExpiredInviteLinkState() (ExpiredInviteLinkState, error)
AsExpiredInviteLinkState returns the union data inside the InviteLinkState as a ExpiredInviteLinkState
func (InviteLinkState) AsRevokedInviteLinkState ¶
func (t InviteLinkState) AsRevokedInviteLinkState() (RevokedInviteLinkState, error)
AsRevokedInviteLinkState returns the union data inside the InviteLinkState as a RevokedInviteLinkState
func (InviteLinkState) Discriminator ¶
func (t InviteLinkState) Discriminator() (string, error)
func (*InviteLinkState) FromActiveInviteLinkState ¶
func (t *InviteLinkState) FromActiveInviteLinkState(v ActiveInviteLinkState) error
FromActiveInviteLinkState overwrites any union data inside the InviteLinkState as the provided ActiveInviteLinkState
func (*InviteLinkState) FromExpiredInviteLinkState ¶
func (t *InviteLinkState) FromExpiredInviteLinkState(v ExpiredInviteLinkState) error
FromExpiredInviteLinkState overwrites any union data inside the InviteLinkState as the provided ExpiredInviteLinkState
func (*InviteLinkState) FromRevokedInviteLinkState ¶
func (t *InviteLinkState) FromRevokedInviteLinkState(v RevokedInviteLinkState) error
FromRevokedInviteLinkState overwrites any union data inside the InviteLinkState as the provided RevokedInviteLinkState
func (InviteLinkState) MarshalJSON ¶
func (t InviteLinkState) MarshalJSON() ([]byte, error)
func (*InviteLinkState) MergeActiveInviteLinkState ¶
func (t *InviteLinkState) MergeActiveInviteLinkState(v ActiveInviteLinkState) error
MergeActiveInviteLinkState performs a merge with any union data inside the InviteLinkState, using the provided ActiveInviteLinkState
func (*InviteLinkState) MergeExpiredInviteLinkState ¶
func (t *InviteLinkState) MergeExpiredInviteLinkState(v ExpiredInviteLinkState) error
MergeExpiredInviteLinkState performs a merge with any union data inside the InviteLinkState, using the provided ExpiredInviteLinkState
func (*InviteLinkState) MergeRevokedInviteLinkState ¶
func (t *InviteLinkState) MergeRevokedInviteLinkState(v RevokedInviteLinkState) error
MergeRevokedInviteLinkState performs a merge with any union data inside the InviteLinkState, using the provided RevokedInviteLinkState
func (*InviteLinkState) UnmarshalJSON ¶
func (t *InviteLinkState) UnmarshalJSON(b []byte) error
func (InviteLinkState) ValueByDiscriminator ¶
func (t InviteLinkState) ValueByDiscriminator() (interface{}, error)
type ListInviteLinks200JSONResponse ¶
type ListInviteLinks200JSONResponse InviteLinkList
func (ListInviteLinks200JSONResponse) VisitListInviteLinksResponse ¶
func (response ListInviteLinks200JSONResponse) VisitListInviteLinksResponse(w http.ResponseWriter) error
type ListInviteLinks400ApplicationProblemPlusJSONResponse ¶
type ListInviteLinks400ApplicationProblemPlusJSONResponse Problem
func (ListInviteLinks400ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse ¶
func (response ListInviteLinks400ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse(w http.ResponseWriter) error
type ListInviteLinks403ApplicationProblemPlusJSONResponse ¶
type ListInviteLinks403ApplicationProblemPlusJSONResponse Problem
func (ListInviteLinks403ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse ¶
func (response ListInviteLinks403ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse(w http.ResponseWriter) error
type ListInviteLinks500ApplicationProblemPlusJSONResponse ¶
type ListInviteLinks500ApplicationProblemPlusJSONResponse Problem
func (ListInviteLinks500ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse ¶
func (response ListInviteLinks500ApplicationProblemPlusJSONResponse) VisitListInviteLinksResponse(w http.ResponseWriter) error
type ListInviteLinksParams ¶
type ListInviteLinksParams struct {
// Status Keeps only the links in that state. Without it every link the team has comes back, spent and revoked ones included.
Status *ListInviteLinksParamsStatus `form:"status,omitempty" json:"status,omitempty"`
}
ListInviteLinksParams defines parameters for ListInviteLinks.
type ListInviteLinksParamsStatus ¶
type ListInviteLinksParamsStatus string
ListInviteLinksParamsStatus defines parameters for ListInviteLinks.
const ( ListInviteLinksParamsStatusActive ListInviteLinksParamsStatus = "active" ListInviteLinksParamsStatusExpired ListInviteLinksParamsStatus = "expired" ListInviteLinksParamsStatusRevoked ListInviteLinksParamsStatus = "revoked" )
Defines values for ListInviteLinksParamsStatus.
func (ListInviteLinksParamsStatus) Valid ¶
func (e ListInviteLinksParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListInviteLinksParamsStatus enum.
type ListInviteLinksRequestObject ¶
type ListInviteLinksRequestObject struct {
TeamId string `json:"team_id"`
Params ListInviteLinksParams
}
type ListInviteLinksResponseObject ¶
type ListInviteLinksResponseObject interface {
VisitListInviteLinksResponse(w http.ResponseWriter) error
}
type ListMyTeams200JSONResponse ¶
type ListMyTeams200JSONResponse TeamList
func (ListMyTeams200JSONResponse) VisitListMyTeamsResponse ¶
func (response ListMyTeams200JSONResponse) VisitListMyTeamsResponse(w http.ResponseWriter) error
type ListMyTeams400ApplicationProblemPlusJSONResponse ¶
type ListMyTeams400ApplicationProblemPlusJSONResponse Problem
func (ListMyTeams400ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse ¶
func (response ListMyTeams400ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse(w http.ResponseWriter) error
type ListMyTeams403ApplicationProblemPlusJSONResponse ¶
type ListMyTeams403ApplicationProblemPlusJSONResponse Problem
func (ListMyTeams403ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse ¶
func (response ListMyTeams403ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse(w http.ResponseWriter) error
type ListMyTeams500ApplicationProblemPlusJSONResponse ¶
type ListMyTeams500ApplicationProblemPlusJSONResponse Problem
func (ListMyTeams500ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse ¶
func (response ListMyTeams500ApplicationProblemPlusJSONResponse) VisitListMyTeamsResponse(w http.ResponseWriter) error
type ListMyTeamsRequestObject ¶
type ListMyTeamsRequestObject struct {
}
type ListMyTeamsResponseObject ¶
type ListMyTeamsResponseObject interface {
VisitListMyTeamsResponse(w http.ResponseWriter) error
}
type MiddlewareFunc ¶
type Pass ¶
type Pass struct {
// AccessExpiresIn Seconds the access token will be accepted for.
AccessExpiresIn int `json:"access_expires_in"`
AccessToken string `json:"access_token"`
// RefreshExpiresIn Seconds the refresh token will be accepted for. Starts over with every refresh: a session dies from disuse, not from age.
RefreshExpiresIn int `json:"refresh_expires_in"`
RefreshToken string `json:"refresh_token"`
}
Pass The keys to a session, not the session itself. The access token is short-lived and travels in Authorization on every request. The refresh token is long-lived and buys a fresh pair once the access token dies; it is the one worth stealing, and belongs where scripts cannot reach it. Both lifetimes are counted from the moment this answer arrives rather than named as instants. Their holder acts on them, and naming an instant would send it to its own clock — the one thing here not worth trusting. A phone kept off the network drifts by minutes, and an access token lives fifteen.
type Problem ¶
type Problem struct {
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
Status int `json:"status"`
Title string `json:"title"`
Type *string `json:"type,omitempty"`
}
Problem RFC 9457 Problem Details for HTTP APIs.
func NewDetailedProblem ¶
NewDetailedProblem builds a Problem for status, with detail explaining what specifically went wrong.
func NewProblem ¶
NewProblem builds a Problem for status, with no further detail.
type RefreshSession200JSONResponse ¶
type RefreshSession200JSONResponse Pass
func (RefreshSession200JSONResponse) VisitRefreshSessionResponse ¶
func (response RefreshSession200JSONResponse) VisitRefreshSessionResponse(w http.ResponseWriter) error
type RefreshSession400ApplicationProblemPlusJSONResponse ¶
type RefreshSession400ApplicationProblemPlusJSONResponse Problem
func (RefreshSession400ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse ¶
func (response RefreshSession400ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse(w http.ResponseWriter) error
type RefreshSession401ApplicationProblemPlusJSONResponse ¶
type RefreshSession401ApplicationProblemPlusJSONResponse Problem
func (RefreshSession401ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse ¶
func (response RefreshSession401ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse(w http.ResponseWriter) error
type RefreshSession500ApplicationProblemPlusJSONResponse ¶
type RefreshSession500ApplicationProblemPlusJSONResponse Problem
func (RefreshSession500ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse ¶
func (response RefreshSession500ApplicationProblemPlusJSONResponse) VisitRefreshSessionResponse(w http.ResponseWriter) error
type RefreshSessionJSONRequestBody ¶
type RefreshSessionJSONRequestBody = RefreshSessionRequest
RefreshSessionJSONRequestBody defines body for RefreshSession for application/json ContentType.
type RefreshSessionRequest ¶
type RefreshSessionRequest struct {
RefreshToken string `json:"refresh_token"`
}
RefreshSessionRequest defines model for RefreshSessionRequest.
type RefreshSessionRequestObject ¶
type RefreshSessionRequestObject struct {
Body *RefreshSessionJSONRequestBody
}
type RefreshSessionResponseObject ¶
type RefreshSessionResponseObject interface {
VisitRefreshSessionResponse(w http.ResponseWriter) error
}
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type RevokeInviteLink204Response ¶
type RevokeInviteLink204Response struct {
}
func (RevokeInviteLink204Response) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink204Response) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLink400ApplicationProblemPlusJSONResponse ¶
type RevokeInviteLink400ApplicationProblemPlusJSONResponse Problem
func (RevokeInviteLink400ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink400ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLink403ApplicationProblemPlusJSONResponse ¶
type RevokeInviteLink403ApplicationProblemPlusJSONResponse Problem
func (RevokeInviteLink403ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink403ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLink404ApplicationProblemPlusJSONResponse ¶
type RevokeInviteLink404ApplicationProblemPlusJSONResponse Problem
func (RevokeInviteLink404ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink404ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLink409ApplicationProblemPlusJSONResponse ¶
type RevokeInviteLink409ApplicationProblemPlusJSONResponse Problem
func (RevokeInviteLink409ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink409ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLink500ApplicationProblemPlusJSONResponse ¶
type RevokeInviteLink500ApplicationProblemPlusJSONResponse Problem
func (RevokeInviteLink500ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse ¶
func (response RevokeInviteLink500ApplicationProblemPlusJSONResponse) VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
type RevokeInviteLinkRequestObject ¶
type RevokeInviteLinkRequestObject struct {
Code string `json:"code"`
}
type RevokeInviteLinkResponseObject ¶
type RevokeInviteLinkResponseObject interface {
VisitRevokeInviteLinkResponse(w http.ResponseWriter) error
}
type RevokedInviteLinkState ¶
type RevokedInviteLinkState struct {
RevokedAt string `json:"revoked_at"`
Status RevokedInviteLinkStateStatus `json:"status"`
}
RevokedInviteLinkState defines model for RevokedInviteLinkState.
type RevokedInviteLinkStateStatus ¶
type RevokedInviteLinkStateStatus string
RevokedInviteLinkStateStatus defines model for RevokedInviteLinkState.Status.
const (
Revoked RevokedInviteLinkStateStatus = "revoked"
)
Defines values for RevokedInviteLinkStateStatus.
func (RevokedInviteLinkStateStatus) Valid ¶
func (e RevokedInviteLinkStateStatus) Valid() bool
Valid indicates whether the value is a known member of the RevokedInviteLinkStateStatus enum.
type Seal ¶
type Seal interface {
Read(token domain.AccessToken) (domain.Actor, error)
}
Seal reads back what was stamped. Only the reading half is named here, because only the reading half happens at the door; the other half belongs to whatever hands passes out, and is named there.
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (Server) AcceptInviteLink ¶
func (s Server) AcceptInviteLink( ctx context.Context, req AcceptInviteLinkRequestObject, ) (AcceptInviteLinkResponseObject, error)
func (Server) CreateCode ¶
func (s Server) CreateCode( ctx context.Context, req CreateCodeRequestObject, ) (CreateCodeResponseObject, error)
func (Server) CreateIntroduction ¶
func (s Server) CreateIntroduction( ctx context.Context, req CreateIntroductionRequestObject, ) (CreateIntroductionResponseObject, error)
func (Server) CreateInviteLink ¶
func (s Server) CreateInviteLink( ctx context.Context, req CreateInviteLinkRequestObject, ) (CreateInviteLinkResponseObject, error)
func (Server) CreateSession ¶
func (s Server) CreateSession( ctx context.Context, req CreateSessionRequestObject, ) (CreateSessionResponseObject, error)
func (Server) CreateTeam ¶
func (s Server) CreateTeam( ctx context.Context, req CreateTeamRequestObject, ) (CreateTeamResponseObject, error)
func (Server) DeleteSession ¶
func (s Server) DeleteSession( ctx context.Context, _ DeleteSessionRequestObject, ) (DeleteSessionResponseObject, error)
func (Server) GetMe ¶
func (s Server) GetMe( ctx context.Context, req GetMeRequestObject, ) (GetMeResponseObject, error)
func (Server) GetTeam ¶
func (s Server) GetTeam( ctx context.Context, req GetTeamRequestObject, ) (GetTeamResponseObject, error)
func (Server) ListInviteLinks ¶
func (s Server) ListInviteLinks( ctx context.Context, req ListInviteLinksRequestObject, ) (ListInviteLinksResponseObject, error)
func (Server) ListMyTeams ¶
func (s Server) ListMyTeams( ctx context.Context, req ListMyTeamsRequestObject, ) (ListMyTeamsResponseObject, error)
func (Server) RefreshSession ¶
func (s Server) RefreshSession( ctx context.Context, req RefreshSessionRequestObject, ) (RefreshSessionResponseObject, error)
func (Server) RevokeInviteLink ¶
func (s Server) RevokeInviteLink( ctx context.Context, req RevokeInviteLinkRequestObject, ) (RevokeInviteLinkResponseObject, error)
type ServerInterface ¶
type ServerInterface interface {
// Request a sign-in code
// (POST /auth/codes)
CreateCode(w http.ResponseWriter, r *http.Request)
// Sign in with a code
// (POST /auth/sessions)
CreateSession(w http.ResponseWriter, r *http.Request)
// Sign out
// (DELETE /auth/sessions/current)
DeleteSession(w http.ResponseWriter, r *http.Request)
// Trade the refresh token for a fresh pass
// (POST /auth/sessions/current/refresh)
RefreshSession(w http.ResponseWriter, r *http.Request)
// Revoke an invite link
// (DELETE /invite-links/{code})
RevokeInviteLink(w http.ResponseWriter, r *http.Request, code string)
// Join a team via an invite link
// (POST /invite-links/{code}/acceptances)
AcceptInviteLink(w http.ResponseWriter, r *http.Request, code string)
// Create a team
// (POST /teams)
CreateTeam(w http.ResponseWriter, r *http.Request)
// Get a team
// (GET /teams/{id})
GetTeam(w http.ResponseWriter, r *http.Request, id string)
// List the team's invite links
// (GET /teams/{team_id}/invite-links)
ListInviteLinks(w http.ResponseWriter, r *http.Request, teamId string, params ListInviteLinksParams)
// Create an invite link
// (POST /teams/{team_id}/invite-links)
CreateInviteLink(w http.ResponseWriter, r *http.Request, teamId string)
// Get the caller
// (GET /users/me)
GetMe(w http.ResponseWriter, r *http.Request)
// Introduce yourself
// (POST /users/me/introduction)
CreateIntroduction(w http.ResponseWriter, r *http.Request)
// List the caller's teams
// (GET /users/me/teams)
ListMyTeams(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) AcceptInviteLink ¶
func (siw *ServerInterfaceWrapper) AcceptInviteLink(w http.ResponseWriter, r *http.Request)
AcceptInviteLink operation middleware
func (*ServerInterfaceWrapper) CreateCode ¶
func (siw *ServerInterfaceWrapper) CreateCode(w http.ResponseWriter, r *http.Request)
CreateCode operation middleware
func (*ServerInterfaceWrapper) CreateIntroduction ¶
func (siw *ServerInterfaceWrapper) CreateIntroduction(w http.ResponseWriter, r *http.Request)
CreateIntroduction operation middleware
func (*ServerInterfaceWrapper) CreateInviteLink ¶
func (siw *ServerInterfaceWrapper) CreateInviteLink(w http.ResponseWriter, r *http.Request)
CreateInviteLink operation middleware
func (*ServerInterfaceWrapper) CreateSession ¶
func (siw *ServerInterfaceWrapper) CreateSession(w http.ResponseWriter, r *http.Request)
CreateSession operation middleware
func (*ServerInterfaceWrapper) CreateTeam ¶
func (siw *ServerInterfaceWrapper) CreateTeam(w http.ResponseWriter, r *http.Request)
CreateTeam operation middleware
func (*ServerInterfaceWrapper) DeleteSession ¶
func (siw *ServerInterfaceWrapper) DeleteSession(w http.ResponseWriter, r *http.Request)
DeleteSession operation middleware
func (*ServerInterfaceWrapper) GetMe ¶
func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request)
GetMe operation middleware
func (*ServerInterfaceWrapper) GetTeam ¶
func (siw *ServerInterfaceWrapper) GetTeam(w http.ResponseWriter, r *http.Request)
GetTeam operation middleware
func (*ServerInterfaceWrapper) ListInviteLinks ¶
func (siw *ServerInterfaceWrapper) ListInviteLinks(w http.ResponseWriter, r *http.Request)
ListInviteLinks operation middleware
func (*ServerInterfaceWrapper) ListMyTeams ¶
func (siw *ServerInterfaceWrapper) ListMyTeams(w http.ResponseWriter, r *http.Request)
ListMyTeams operation middleware
func (*ServerInterfaceWrapper) RefreshSession ¶
func (siw *ServerInterfaceWrapper) RefreshSession(w http.ResponseWriter, r *http.Request)
RefreshSession operation middleware
func (*ServerInterfaceWrapper) RevokeInviteLink ¶
func (siw *ServerInterfaceWrapper) RevokeInviteLink(w http.ResponseWriter, r *http.Request)
RevokeInviteLink operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Request a sign-in code
// (POST /auth/codes)
CreateCode(ctx context.Context, request CreateCodeRequestObject) (CreateCodeResponseObject, error)
// Sign in with a code
// (POST /auth/sessions)
CreateSession(ctx context.Context, request CreateSessionRequestObject) (CreateSessionResponseObject, error)
// Sign out
// (DELETE /auth/sessions/current)
DeleteSession(ctx context.Context, request DeleteSessionRequestObject) (DeleteSessionResponseObject, error)
// Trade the refresh token for a fresh pass
// (POST /auth/sessions/current/refresh)
RefreshSession(ctx context.Context, request RefreshSessionRequestObject) (RefreshSessionResponseObject, error)
// Revoke an invite link
// (DELETE /invite-links/{code})
RevokeInviteLink(ctx context.Context, request RevokeInviteLinkRequestObject) (RevokeInviteLinkResponseObject, error)
// Join a team via an invite link
// (POST /invite-links/{code}/acceptances)
AcceptInviteLink(ctx context.Context, request AcceptInviteLinkRequestObject) (AcceptInviteLinkResponseObject, error)
// Create a team
// (POST /teams)
CreateTeam(ctx context.Context, request CreateTeamRequestObject) (CreateTeamResponseObject, error)
// Get a team
// (GET /teams/{id})
GetTeam(ctx context.Context, request GetTeamRequestObject) (GetTeamResponseObject, error)
// List the team's invite links
// (GET /teams/{team_id}/invite-links)
ListInviteLinks(ctx context.Context, request ListInviteLinksRequestObject) (ListInviteLinksResponseObject, error)
// Create an invite link
// (POST /teams/{team_id}/invite-links)
CreateInviteLink(ctx context.Context, request CreateInviteLinkRequestObject) (CreateInviteLinkResponseObject, error)
// Get the caller
// (GET /users/me)
GetMe(ctx context.Context, request GetMeRequestObject) (GetMeResponseObject, error)
// Introduce yourself
// (POST /users/me/introduction)
CreateIntroduction(ctx context.Context, request CreateIntroductionRequestObject) (CreateIntroductionResponseObject, error)
// List the caller's teams
// (GET /users/me/teams)
ListMyTeams(ctx context.Context, request ListMyTeamsRequestObject) (ListMyTeamsResponseObject, error)
}
StrictServerInterface represents all server handlers.
type Team ¶
type Team struct {
CreatedAt string `json:"created_at"`
Id string `json:"id"`
Name TeamName `json:"name"`
}
Team defines model for Team.
type TeamList ¶
type TeamList struct {
Items []Team `json:"items"`
}
TeamList Teams wrapped in an object rather than handed over as a bare array. A list eventually needs things said about it — where the next page starts, how many there are in all — and a bare array leaves nowhere to say them without changing the shape of every answer that came before.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnintroducedUserState ¶
type UnintroducedUserState struct {
Status UnintroducedUserStateStatus `json:"status"`
}
UnintroducedUserState The person exists and nothing else about them is known yet. Carries no name — not an empty one, none at all, so that "introduced without a name" cannot be said.
type UnintroducedUserStateStatus ¶
type UnintroducedUserStateStatus string
UnintroducedUserStateStatus defines model for UnintroducedUserState.Status.
const (
Unintroduced UnintroducedUserStateStatus = "unintroduced"
)
Defines values for UnintroducedUserStateStatus.
func (UnintroducedUserStateStatus) Valid ¶
func (e UnintroducedUserStateStatus) Valid() bool
Valid indicates whether the value is a known member of the UnintroducedUserStateStatus enum.
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type User ¶
type User struct {
CreatedAt string `json:"created_at"`
Id string `json:"id"`
State UserState `json:"state"`
}
User defines model for User.
type UserState ¶
type UserState struct {
// contains filtered or unexported fields
}
UserState defines model for UserState.
func (UserState) AsIntroducedUserState ¶
func (t UserState) AsIntroducedUserState() (IntroducedUserState, error)
AsIntroducedUserState returns the union data inside the UserState as a IntroducedUserState
func (UserState) AsUnintroducedUserState ¶
func (t UserState) AsUnintroducedUserState() (UnintroducedUserState, error)
AsUnintroducedUserState returns the union data inside the UserState as a UnintroducedUserState
func (UserState) Discriminator ¶
func (*UserState) FromIntroducedUserState ¶
func (t *UserState) FromIntroducedUserState(v IntroducedUserState) error
FromIntroducedUserState overwrites any union data inside the UserState as the provided IntroducedUserState
func (*UserState) FromUnintroducedUserState ¶
func (t *UserState) FromUnintroducedUserState(v UnintroducedUserState) error
FromUnintroducedUserState overwrites any union data inside the UserState as the provided UnintroducedUserState
func (UserState) MarshalJSON ¶
func (*UserState) MergeIntroducedUserState ¶
func (t *UserState) MergeIntroducedUserState(v IntroducedUserState) error
MergeIntroducedUserState performs a merge with any union data inside the UserState, using the provided IntroducedUserState
func (*UserState) MergeUnintroducedUserState ¶
func (t *UserState) MergeUnintroducedUserState(v UnintroducedUserState) error
MergeUnintroducedUserState performs a merge with any union data inside the UserState, using the provided UnintroducedUserState
func (*UserState) UnmarshalJSON ¶
func (UserState) ValueByDiscriminator ¶
type Username ¶
type Username = string
Username Lowercase letters, digits and underscores, 3 to 32 of them, never starting, ending or doubling on the underscore. The alphabet is narrow on purpose: a name that identifies can be impersonated by one that merely resembles it, and within a single script no two characters resemble each other closely enough. Capitals are refused rather than folded, so that one person has one spelling.