Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Package gen contains code generated from api/openapi.yaml. Do not edit.
Index ¶
- 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
- type FieldError
- type GetMe200JSONResponse
- type GetMeRequestObject
- type GetMeResponseObject
- type GetMedefaultApplicationProblemPlusJSONResponse
- type GetMeta200JSONResponse
- type GetMetaRequestObject
- type GetMetaResponseObject
- type GetMetadefaultApplicationProblemPlusJSONResponse
- type GetOrganization200JSONResponse
- type GetOrganizationRequestObject
- type GetOrganizationResponseObject
- type GetOrganizationdefaultApplicationProblemPlusJSONResponse
- type InvalidParamFormatError
- type Me
- type MeMembership
- type MeUser
- type MembershipRole
- type Meta
- type MetaService
- type MiddlewareFunc
- type OrgId
- type Organization
- type Problem
- type ProblemApplicationProblemPlusJSONResponse
- type ProblemCode
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
type FieldError ¶
FieldError defines model for FieldError.
type GetMe200JSONResponse ¶
type GetMe200JSONResponse Me
func (GetMe200JSONResponse) VisitGetMeResponse ¶
func (response GetMe200JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMeRequestObject ¶
type GetMeRequestObject struct {
}
type GetMeResponseObject ¶
type GetMeResponseObject interface {
VisitGetMeResponse(w http.ResponseWriter) error
}
type GetMedefaultApplicationProblemPlusJSONResponse ¶
func (GetMedefaultApplicationProblemPlusJSONResponse) VisitGetMeResponse ¶
func (response GetMedefaultApplicationProblemPlusJSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMeta200JSONResponse ¶
type GetMeta200JSONResponse Meta
func (GetMeta200JSONResponse) VisitGetMetaResponse ¶
func (response GetMeta200JSONResponse) VisitGetMetaResponse(w http.ResponseWriter) error
type GetMetaRequestObject ¶
type GetMetaRequestObject struct {
}
type GetMetaResponseObject ¶
type GetMetaResponseObject interface {
VisitGetMetaResponse(w http.ResponseWriter) error
}
type GetMetadefaultApplicationProblemPlusJSONResponse ¶
func (GetMetadefaultApplicationProblemPlusJSONResponse) VisitGetMetaResponse ¶
func (response GetMetadefaultApplicationProblemPlusJSONResponse) VisitGetMetaResponse(w http.ResponseWriter) error
type GetOrganization200JSONResponse ¶
type GetOrganization200JSONResponse Organization
func (GetOrganization200JSONResponse) VisitGetOrganizationResponse ¶
func (response GetOrganization200JSONResponse) VisitGetOrganizationResponse(w http.ResponseWriter) error
type GetOrganizationRequestObject ¶
type GetOrganizationRequestObject struct {
OrgId OrgId `json:"orgId"`
}
type GetOrganizationResponseObject ¶
type GetOrganizationResponseObject interface {
VisitGetOrganizationResponse(w http.ResponseWriter) error
}
type GetOrganizationdefaultApplicationProblemPlusJSONResponse ¶
type GetOrganizationdefaultApplicationProblemPlusJSONResponse struct {
Body Problem
StatusCode int
}
func (GetOrganizationdefaultApplicationProblemPlusJSONResponse) VisitGetOrganizationResponse ¶
func (response GetOrganizationdefaultApplicationProblemPlusJSONResponse) VisitGetOrganizationResponse(w http.ResponseWriter) error
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type Me ¶
type Me struct {
Memberships []MeMembership `json:"memberships"`
User MeUser `json:"user"`
}
Me defines model for Me.
type MeMembership ¶
type MeMembership struct {
Name string `json:"name"`
OrganizationId openapi_types.UUID `json:"organizationId"`
// Permissions Expanded permission strings for this membership's role.
Permissions []string `json:"permissions"`
Role MembershipRole `json:"role"`
Slug string `json:"slug"`
}
MeMembership defines model for MeMembership.
type MeUser ¶
type MeUser struct {
DisplayName string `json:"displayName"`
Email *openapi_types.Email `json:"email,omitempty"`
Id openapi_types.UUID `json:"id"`
}
MeUser defines model for MeUser.
type MembershipRole ¶
type MembershipRole string
MembershipRole defines model for MembershipRole.
const ( Admin MembershipRole = "admin" Dispatcher MembershipRole = "dispatcher" Owner MembershipRole = "owner" Technician MembershipRole = "technician" Viewer MembershipRole = "viewer" )
Defines values for MembershipRole.
func (MembershipRole) Valid ¶
func (e MembershipRole) Valid() bool
Valid indicates whether the value is a known member of the MembershipRole enum.
type Meta ¶
type Meta struct {
// Commit Abbreviated git commit of the build.
Commit string `json:"commit"`
Service MetaService `json:"service"`
// Version Examples: v1.0.0, dev
Version string `json:"version"`
}
Meta defines model for Meta.
type MetaService ¶
type MetaService string
MetaService defines model for Meta.Service.
const (
Opsgrid MetaService = "opsgrid"
)
Defines values for MetaService.
func (MetaService) Valid ¶
func (e MetaService) Valid() bool
Valid indicates whether the value is a known member of the MetaService enum.
type Organization ¶
type Organization struct {
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
}
Organization defines model for Organization.
type Problem ¶
type Problem struct {
// Code Stable, machine-readable error identifier (never renamed).
Code ProblemCode `json:"code"`
Detail *string `json:"detail,omitempty"`
Details *map[string]interface{} `json:"details,omitempty"`
Errors *[]FieldError `json:"errors,omitempty"`
Instance *string `json:"instance,omitempty"`
RequestId *string `json:"requestId,omitempty"`
Status int `json:"status"`
Title string `json:"title"`
TraceId *string `json:"traceId,omitempty"`
Type string `json:"type"`
}
Problem RFC 9457 problem details with OpsGrid extension members.
type ProblemApplicationProblemPlusJSONResponse ¶
type ProblemApplicationProblemPlusJSONResponse Problem
type ProblemCode ¶
type ProblemCode string
ProblemCode Stable, machine-readable error identifier (never renamed).
const ( AUTHENTICATIONREQUIRED ProblemCode = "AUTHENTICATION_REQUIRED" DEPENDENCYUNAVAILABLE ProblemCode = "DEPENDENCY_UNAVAILABLE" FORBIDDEN ProblemCode = "FORBIDDEN" IDEMPOTENCYCONFLICT ProblemCode = "IDEMPOTENCY_CONFLICT" IDEMPOTENCYKEYREQUIRED ProblemCode = "IDEMPOTENCY_KEY_REQUIRED" INTERNALERROR ProblemCode = "INTERNAL_ERROR" INVALIDTRANSITION ProblemCode = "INVALID_TRANSITION" PRECONDITIONREQUIRED ProblemCode = "PRECONDITION_REQUIRED" RATELIMITED ProblemCode = "RATE_LIMITED" REQUESTTOOLARGE ProblemCode = "REQUEST_TOO_LARGE" RESOURCENOTFOUND ProblemCode = "RESOURCE_NOT_FOUND" SCHEDULECONFLICT ProblemCode = "SCHEDULE_CONFLICT" TENANTNOTFOUND ProblemCode = "TENANT_NOT_FOUND" UNSUPPORTEDMEDIATYPE ProblemCode = "UNSUPPORTED_MEDIA_TYPE" VALIDATIONFAILED ProblemCode = "VALIDATION_FAILED" VERSIONCONFLICT ProblemCode = "VERSION_CONFLICT" )
Defines values for ProblemCode.
func (ProblemCode) Valid ¶
func (e ProblemCode) Valid() bool
Valid indicates whether the value is a known member of the ProblemCode enum.
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 ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// GetMe Current user, memberships and permissions
// (GET /v1/me)
GetMe(w http.ResponseWriter, r *http.Request)
// GetMeta Service build information
// (GET /v1/meta)
GetMeta(w http.ResponseWriter, r *http.Request)
// GetOrganization Organization summary for an active member
// (GET /v1/organizations/{orgId})
GetOrganization(w http.ResponseWriter, r *http.Request, orgId OrgId)
}
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) GetMe ¶
func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request)
GetMe operation middleware
func (*ServerInterfaceWrapper) GetMeta ¶
func (siw *ServerInterfaceWrapper) GetMeta(w http.ResponseWriter, r *http.Request)
GetMeta operation middleware
func (*ServerInterfaceWrapper) GetOrganization ¶
func (siw *ServerInterfaceWrapper) GetOrganization(w http.ResponseWriter, r *http.Request)
GetOrganization 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 {
// GetMe Current user, memberships and permissions
// (GET /v1/me)
GetMe(ctx context.Context, request GetMeRequestObject) (GetMeResponseObject, error)
// GetMeta Service build information
// (GET /v1/meta)
GetMeta(ctx context.Context, request GetMetaRequestObject) (GetMetaResponseObject, error)
// GetOrganization Organization summary for an active member
// (GET /v1/organizations/{orgId})
GetOrganization(ctx context.Context, request GetOrganizationRequestObject) (GetOrganizationResponseObject, error)
}
StrictServerInterface represents all server handlers.
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 UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error