v1

package
v0.0.0-...-e81234b Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BasicScopes  contextKey = "Basic.Scopes"
	BearerScopes contextKey = "Bearer.Scopes"
	HeaderScopes contextKey = "Header.Scopes"
)

Variables

This section is empty.

Functions

func FromPtr

func FromPtr[T any](v *T) T

FromPtr transform input from pointer.

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func Notify

func Notify(w http.ResponseWriter, notification Notification)

Notify simply processes a notification.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func ToPtr

func ToPtr[T any](v T) *T

ToPtr transform input to a pointer.

Types

type API

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

API provides the http.Handler for the OpenAPI implementation.

func New

func New(
	cfg *config.Config,
	registry *metrics.Metrics,
	identity *authn.Authn,
	uploads upload.Upload,
	storage *store.Store,
) *API

New creates a new API that adds the handler implementations.

func (*API) AllowAdminAccessOnly

func (a *API) AllowAdminAccessOnly(next http.Handler) http.Handler

AllowAdminAccessOnly defines a middleware to check permissions.

func (*API) AttachGroupToUser

func (a *API) AttachGroupToUser(w http.ResponseWriter, r *http.Request, _ GroupID)

AttachGroupToUser implements the v1.ServerInterface.

func (*API) AttachUserToGroup

func (a *API) AttachUserToGroup(w http.ResponseWriter, r *http.Request, _ UserID)

AttachUserToGroup implements the v1.ServerInterface.

func (*API) Authentication

func (a *API) Authentication(ctx context.Context, input *openapi3filter.AuthenticationInput) error

Authentication provides the authentication for the OpenAPI filter.

func (*API) CallbackProvider

func (a *API) CallbackProvider(w http.ResponseWriter, r *http.Request, providerParam AuthProviderParam, params CallbackProviderParams)

CallbackProvider implements the v1.ServerInterface.

func (*API) CreateGroup

func (a *API) CreateGroup(w http.ResponseWriter, r *http.Request)

CreateGroup implements the v1.ServerInterface.

func (*API) CreateUser

func (a *API) CreateUser(w http.ResponseWriter, r *http.Request)

CreateUser implements the v1.ServerInterface.

func (*API) DeleteGroup

func (a *API) DeleteGroup(w http.ResponseWriter, r *http.Request, _ GroupID)

DeleteGroup implements the v1.ServerInterface.

func (*API) DeleteGroupFromUser

func (a *API) DeleteGroupFromUser(w http.ResponseWriter, r *http.Request, _ GroupID)

DeleteGroupFromUser implements the v1.ServerInterface.

func (*API) DeleteUser

func (a *API) DeleteUser(w http.ResponseWriter, r *http.Request, _ UserID)

DeleteUser implements the v1.ServerInterface.

func (*API) DeleteUserFromGroup

func (a *API) DeleteUserFromGroup(w http.ResponseWriter, r *http.Request, _ UserID)

DeleteUserFromGroup implements the v1.ServerInterface.

func (*API) GroupFromContext

func (a *API) GroupFromContext(ctx context.Context) *model.Group

GroupFromContext is used to get the requested group from the context.

func (*API) GroupToContext

func (a *API) GroupToContext(next http.Handler) http.Handler

GroupToContext is used to put the requested group into the context.

func (*API) ListGroupUsers

func (a *API) ListGroupUsers(w http.ResponseWriter, r *http.Request, _ GroupID, params ListGroupUsersParams)

ListGroupUsers implements the v1.ServerInterface.

func (*API) ListGroups

func (a *API) ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams)

ListGroups implements the v1.ServerInterface.

func (*API) ListProviders

func (a *API) ListProviders(w http.ResponseWriter, r *http.Request)

ListProviders implements the v1.ServerInterface.

func (*API) ListUserGroups

func (a *API) ListUserGroups(w http.ResponseWriter, r *http.Request, _ UserID, params ListUserGroupsParams)

ListUserGroups implements the v1.ServerInterface.

func (*API) ListUsers

func (a *API) ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams)

ListUsers implements the v1.ServerInterface.

func (*API) LoginAuth

func (a *API) LoginAuth(w http.ResponseWriter, r *http.Request)

LoginAuth implements the v1.ServerInterface.

func (*API) PermitGroupUser

func (a *API) PermitGroupUser(w http.ResponseWriter, r *http.Request, _ GroupID)

PermitGroupUser implements the v1.ServerInterface.

func (*API) PermitUserGroup

func (a *API) PermitUserGroup(w http.ResponseWriter, r *http.Request, _ UserID)

PermitUserGroup implements the v1.ServerInterface.

func (*API) RefreshAuth

func (a *API) RefreshAuth(w http.ResponseWriter, r *http.Request)

RefreshAuth implements the v1.ServerInterface.

func (*API) RenderNotify

func (a *API) RenderNotify(w http.ResponseWriter, r *http.Request, notify Notification)

RenderNotify is a helper to set a correct status for notifications.

func (*API) RequestProvider

func (a *API) RequestProvider(w http.ResponseWriter, r *http.Request, providerParam AuthProviderParam)

RequestProvider implements the v1.ServerInterface.

func (*API) ShowGroup

func (a *API) ShowGroup(w http.ResponseWriter, r *http.Request, _ GroupID)

ShowGroup implements the v1.ServerInterface.

func (*API) ShowProfile

func (a *API) ShowProfile(w http.ResponseWriter, r *http.Request)

ShowProfile implements the v1.ServerInterface.

func (*API) ShowUser

func (a *API) ShowUser(w http.ResponseWriter, r *http.Request, _ UserID)

ShowUser implements the v1.ServerInterface.

func (*API) TokenProfile

func (a *API) TokenProfile(w http.ResponseWriter, r *http.Request)

TokenProfile implements the v1.ServerInterface.

func (*API) UpdateGroup

func (a *API) UpdateGroup(w http.ResponseWriter, r *http.Request, _ GroupID)

UpdateGroup implements the v1.ServerInterface.

func (*API) UpdateProfile

func (a *API) UpdateProfile(w http.ResponseWriter, r *http.Request)

UpdateProfile implements the v1.ServerInterface.

func (*API) UpdateUser

func (a *API) UpdateUser(w http.ResponseWriter, r *http.Request, _ UserID)

UpdateUser implements the v1.ServerInterface.

func (*API) UserFromContext

func (a *API) UserFromContext(ctx context.Context) *model.User

UserFromContext is used to get the requested user from the context.

func (*API) UserToContext

func (a *API) UserToContext(next http.Handler) http.Handler

UserToContext is used to put the requested user into the context.

func (*API) VerifyAuth

func (a *API) VerifyAuth(w http.ResponseWriter, r *http.Request)

VerifyAuth implements the v1.ServerInterface.

type ActionFailedError

type ActionFailedError = Notification

ActionFailedError Generic response for errors and validations

type ActionFailedErrorJSONResponse

type ActionFailedErrorJSONResponse Notification

type AlreadyAttachedError

type AlreadyAttachedError = Notification

AlreadyAttachedError Generic response for errors and validations

type AlreadyAttachedErrorJSONResponse

type AlreadyAttachedErrorJSONResponse Notification

type AttachGroupToUser200JSONResponse

type AttachGroupToUser200JSONResponse struct{ SuccessMessageJSONResponse }

func (AttachGroupToUser200JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser200JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUser403JSONResponse

type AttachGroupToUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (AttachGroupToUser403JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser403JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUser404JSONResponse

type AttachGroupToUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (AttachGroupToUser404JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser404JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUser412JSONResponse

type AttachGroupToUser412JSONResponse struct {
	AlreadyAttachedErrorJSONResponse
}

func (AttachGroupToUser412JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser412JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUser422JSONResponse

type AttachGroupToUser422JSONResponse struct{ ValidationErrorJSONResponse }

func (AttachGroupToUser422JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser422JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUser500JSONResponse

type AttachGroupToUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (AttachGroupToUser500JSONResponse) VisitAttachGroupToUserResponse

func (response AttachGroupToUser500JSONResponse) VisitAttachGroupToUserResponse(w http.ResponseWriter) error

type AttachGroupToUserJSONBody

type AttachGroupToUserJSONBody struct {
	Perm string `json:"perm"`
	User string `json:"user"`
}

AttachGroupToUserJSONBody defines parameters for AttachGroupToUser.

type AttachGroupToUserJSONRequestBody

type AttachGroupToUserJSONRequestBody AttachGroupToUserJSONBody

AttachGroupToUserJSONRequestBody defines body for AttachGroupToUser for application/json ContentType.

type AttachGroupToUserRequestObject

type AttachGroupToUserRequestObject struct {
	GroupID GroupID `json:"group_id"`
	Body    *AttachGroupToUserJSONRequestBody
}

type AttachGroupToUserResponseObject

type AttachGroupToUserResponseObject interface {
	VisitAttachGroupToUserResponse(w http.ResponseWriter) error
}

type AttachUserToGroup200JSONResponse

type AttachUserToGroup200JSONResponse struct{ SuccessMessageJSONResponse }

func (AttachUserToGroup200JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup200JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroup403JSONResponse

type AttachUserToGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (AttachUserToGroup403JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup403JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroup404JSONResponse

type AttachUserToGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (AttachUserToGroup404JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup404JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroup412JSONResponse

type AttachUserToGroup412JSONResponse struct {
	AlreadyAttachedErrorJSONResponse
}

func (AttachUserToGroup412JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup412JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroup422JSONResponse

type AttachUserToGroup422JSONResponse struct{ ValidationErrorJSONResponse }

func (AttachUserToGroup422JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup422JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroup500JSONResponse

type AttachUserToGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (AttachUserToGroup500JSONResponse) VisitAttachUserToGroupResponse

func (response AttachUserToGroup500JSONResponse) VisitAttachUserToGroupResponse(w http.ResponseWriter) error

type AttachUserToGroupJSONBody

type AttachUserToGroupJSONBody struct {
	Group string `json:"group"`
	Perm  string `json:"perm"`
}

AttachUserToGroupJSONBody defines parameters for AttachUserToGroup.

type AttachUserToGroupJSONRequestBody

type AttachUserToGroupJSONRequestBody AttachUserToGroupJSONBody

AttachUserToGroupJSONRequestBody defines body for AttachUserToGroup for application/json ContentType.

type AttachUserToGroupRequestObject

type AttachUserToGroupRequestObject struct {
	UserID UserID `json:"user_id"`
	Body   *AttachUserToGroupJSONRequestBody
}

type AttachUserToGroupResponseObject

type AttachUserToGroupResponseObject interface {
	VisitAttachUserToGroupResponse(w http.ResponseWriter) error
}

type AuthCodeParam

type AuthCodeParam = string

AuthCodeParam defines model for AuthCodeParam.

type AuthProviderParam

type AuthProviderParam = string

AuthProviderParam defines model for AuthProviderParam.

type AuthStateParam

type AuthStateParam = string

AuthStateParam defines model for AuthStateParam.

type AuthToken

type AuthToken struct {
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	Token     *string    `json:"token,omitempty"`
}

AuthToken defines model for AuthToken.

type AuthVerify

type AuthVerify struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Username  *string    `json:"username,omitempty"`
}

AuthVerify defines model for AuthVerify.

type BadCredentialsError

type BadCredentialsError = Notification

BadCredentialsError Generic response for errors and validations

type BadCredentialsErrorJSONResponse

type BadCredentialsErrorJSONResponse Notification

type CallbackProvider308TexthtmlResponse

type CallbackProvider308TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (CallbackProvider308TexthtmlResponse) VisitCallbackProviderResponse

func (response CallbackProvider308TexthtmlResponse) VisitCallbackProviderResponse(w http.ResponseWriter) error

type CallbackProvider404TexthtmlResponse

type CallbackProvider404TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (CallbackProvider404TexthtmlResponse) VisitCallbackProviderResponse

func (response CallbackProvider404TexthtmlResponse) VisitCallbackProviderResponse(w http.ResponseWriter) error

type CallbackProvider412TexthtmlResponse

type CallbackProvider412TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (CallbackProvider412TexthtmlResponse) VisitCallbackProviderResponse

func (response CallbackProvider412TexthtmlResponse) VisitCallbackProviderResponse(w http.ResponseWriter) error

type CallbackProvider500TexthtmlResponse

type CallbackProvider500TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (CallbackProvider500TexthtmlResponse) VisitCallbackProviderResponse

func (response CallbackProvider500TexthtmlResponse) VisitCallbackProviderResponse(w http.ResponseWriter) error

type CallbackProviderParams

type CallbackProviderParams struct {
	// State Auth state
	State *AuthStateParam `form:"state,omitempty" json:"state,omitempty"`

	// Code Auth code
	Code *AuthCodeParam `form:"code,omitempty" json:"code,omitempty"`
}

CallbackProviderParams defines parameters for CallbackProvider.

type CallbackProviderRequestObject

type CallbackProviderRequestObject struct {
	Provider AuthProviderParam `json:"provider"`
	Params   CallbackProviderParams
}

type CallbackProviderResponseObject

type CallbackProviderResponseObject interface {
	VisitCallbackProviderResponse(w http.ResponseWriter) error
}

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CreateGroup200JSONResponse

type CreateGroup200JSONResponse struct{ GroupResponseJSONResponse }

func (CreateGroup200JSONResponse) VisitCreateGroupResponse

func (response CreateGroup200JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error

type CreateGroup403JSONResponse

type CreateGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (CreateGroup403JSONResponse) VisitCreateGroupResponse

func (response CreateGroup403JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error

type CreateGroup422JSONResponse

type CreateGroup422JSONResponse struct{ ValidationErrorJSONResponse }

func (CreateGroup422JSONResponse) VisitCreateGroupResponse

func (response CreateGroup422JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error

type CreateGroup500JSONResponse

type CreateGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (CreateGroup500JSONResponse) VisitCreateGroupResponse

func (response CreateGroup500JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error

type CreateGroupBody

type CreateGroupBody struct {
	Name *string `json:"name,omitempty"`
	Slug *string `json:"slug,omitempty"`
}

CreateGroupBody defines model for CreateGroupBody.

type CreateGroupJSONBody

type CreateGroupJSONBody struct {
	Name *string `json:"name,omitempty"`
	Slug *string `json:"slug,omitempty"`
}

CreateGroupJSONBody defines parameters for CreateGroup.

type CreateGroupJSONRequestBody

type CreateGroupJSONRequestBody CreateGroupJSONBody

CreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.

type CreateGroupRequestObject

type CreateGroupRequestObject struct {
	Body *CreateGroupJSONRequestBody
}

type CreateGroupResponseObject

type CreateGroupResponseObject interface {
	VisitCreateGroupResponse(w http.ResponseWriter) error
}

type CreateUser200JSONResponse

type CreateUser200JSONResponse struct{ UserResponseJSONResponse }

func (CreateUser200JSONResponse) VisitCreateUserResponse

func (response CreateUser200JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser403JSONResponse

type CreateUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (CreateUser403JSONResponse) VisitCreateUserResponse

func (response CreateUser403JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser422JSONResponse

type CreateUser422JSONResponse struct{ ValidationErrorJSONResponse }

func (CreateUser422JSONResponse) VisitCreateUserResponse

func (response CreateUser422JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser500JSONResponse

type CreateUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (CreateUser500JSONResponse) VisitCreateUserResponse

func (response CreateUser500JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUserBody

type CreateUserBody struct {
	Active   *bool   `json:"active,omitempty"`
	Admin    *bool   `json:"admin,omitempty"`
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

CreateUserBody defines model for CreateUserBody.

type CreateUserJSONBody

type CreateUserJSONBody struct {
	Active   *bool   `json:"active,omitempty"`
	Admin    *bool   `json:"admin,omitempty"`
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

CreateUserJSONBody defines parameters for CreateUser.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody CreateUserJSONBody

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserRequestObject

type CreateUserRequestObject struct {
	Body *CreateUserJSONRequestBody
}

type CreateUserResponseObject

type CreateUserResponseObject interface {
	VisitCreateUserResponse(w http.ResponseWriter) error
}

type DeleteGroup200JSONResponse

type DeleteGroup200JSONResponse struct{ SuccessMessageJSONResponse }

func (DeleteGroup200JSONResponse) VisitDeleteGroupResponse

func (response DeleteGroup200JSONResponse) VisitDeleteGroupResponse(w http.ResponseWriter) error

type DeleteGroup400JSONResponse

type DeleteGroup400JSONResponse struct{ ActionFailedErrorJSONResponse }

func (DeleteGroup400JSONResponse) VisitDeleteGroupResponse

func (response DeleteGroup400JSONResponse) VisitDeleteGroupResponse(w http.ResponseWriter) error

type DeleteGroup403JSONResponse

type DeleteGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (DeleteGroup403JSONResponse) VisitDeleteGroupResponse

func (response DeleteGroup403JSONResponse) VisitDeleteGroupResponse(w http.ResponseWriter) error

type DeleteGroup404JSONResponse

type DeleteGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (DeleteGroup404JSONResponse) VisitDeleteGroupResponse

func (response DeleteGroup404JSONResponse) VisitDeleteGroupResponse(w http.ResponseWriter) error

type DeleteGroup500JSONResponse

type DeleteGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteGroup500JSONResponse) VisitDeleteGroupResponse

func (response DeleteGroup500JSONResponse) VisitDeleteGroupResponse(w http.ResponseWriter) error

type DeleteGroupFromUser200JSONResponse

type DeleteGroupFromUser200JSONResponse struct{ SuccessMessageJSONResponse }

func (DeleteGroupFromUser200JSONResponse) VisitDeleteGroupFromUserResponse

func (response DeleteGroupFromUser200JSONResponse) VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error

type DeleteGroupFromUser403JSONResponse

type DeleteGroupFromUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (DeleteGroupFromUser403JSONResponse) VisitDeleteGroupFromUserResponse

func (response DeleteGroupFromUser403JSONResponse) VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error

type DeleteGroupFromUser404JSONResponse

type DeleteGroupFromUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (DeleteGroupFromUser404JSONResponse) VisitDeleteGroupFromUserResponse

func (response DeleteGroupFromUser404JSONResponse) VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error

type DeleteGroupFromUser412JSONResponse

type DeleteGroupFromUser412JSONResponse struct{ NotAttachedErrorJSONResponse }

func (DeleteGroupFromUser412JSONResponse) VisitDeleteGroupFromUserResponse

func (response DeleteGroupFromUser412JSONResponse) VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error

type DeleteGroupFromUser500JSONResponse

type DeleteGroupFromUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteGroupFromUser500JSONResponse) VisitDeleteGroupFromUserResponse

func (response DeleteGroupFromUser500JSONResponse) VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error

type DeleteGroupFromUserJSONBody

type DeleteGroupFromUserJSONBody struct {
	User string `json:"user"`
}

DeleteGroupFromUserJSONBody defines parameters for DeleteGroupFromUser.

type DeleteGroupFromUserJSONRequestBody

type DeleteGroupFromUserJSONRequestBody DeleteGroupFromUserJSONBody

DeleteGroupFromUserJSONRequestBody defines body for DeleteGroupFromUser for application/json ContentType.

type DeleteGroupFromUserRequestObject

type DeleteGroupFromUserRequestObject struct {
	GroupID GroupID `json:"group_id"`
	Body    *DeleteGroupFromUserJSONRequestBody
}

type DeleteGroupFromUserResponseObject

type DeleteGroupFromUserResponseObject interface {
	VisitDeleteGroupFromUserResponse(w http.ResponseWriter) error
}

type DeleteGroupRequestObject

type DeleteGroupRequestObject struct {
	GroupID GroupID `json:"group_id"`
}

type DeleteGroupResponseObject

type DeleteGroupResponseObject interface {
	VisitDeleteGroupResponse(w http.ResponseWriter) error
}

type DeleteUser200JSONResponse

type DeleteUser200JSONResponse struct{ SuccessMessageJSONResponse }

func (DeleteUser200JSONResponse) VisitDeleteUserResponse

func (response DeleteUser200JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error

type DeleteUser400JSONResponse

type DeleteUser400JSONResponse struct{ ActionFailedErrorJSONResponse }

func (DeleteUser400JSONResponse) VisitDeleteUserResponse

func (response DeleteUser400JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error

type DeleteUser403JSONResponse

type DeleteUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (DeleteUser403JSONResponse) VisitDeleteUserResponse

func (response DeleteUser403JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error

type DeleteUser404JSONResponse

type DeleteUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (DeleteUser404JSONResponse) VisitDeleteUserResponse

func (response DeleteUser404JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error

type DeleteUser500JSONResponse

type DeleteUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteUser500JSONResponse) VisitDeleteUserResponse

func (response DeleteUser500JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error

type DeleteUserFromGroup200JSONResponse

type DeleteUserFromGroup200JSONResponse struct{ SuccessMessageJSONResponse }

func (DeleteUserFromGroup200JSONResponse) VisitDeleteUserFromGroupResponse

func (response DeleteUserFromGroup200JSONResponse) VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error

type DeleteUserFromGroup403JSONResponse

type DeleteUserFromGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (DeleteUserFromGroup403JSONResponse) VisitDeleteUserFromGroupResponse

func (response DeleteUserFromGroup403JSONResponse) VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error

type DeleteUserFromGroup404JSONResponse

type DeleteUserFromGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (DeleteUserFromGroup404JSONResponse) VisitDeleteUserFromGroupResponse

func (response DeleteUserFromGroup404JSONResponse) VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error

type DeleteUserFromGroup412JSONResponse

type DeleteUserFromGroup412JSONResponse struct{ NotAttachedErrorJSONResponse }

func (DeleteUserFromGroup412JSONResponse) VisitDeleteUserFromGroupResponse

func (response DeleteUserFromGroup412JSONResponse) VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error

type DeleteUserFromGroup500JSONResponse

type DeleteUserFromGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteUserFromGroup500JSONResponse) VisitDeleteUserFromGroupResponse

func (response DeleteUserFromGroup500JSONResponse) VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error

type DeleteUserFromGroupJSONBody

type DeleteUserFromGroupJSONBody struct {
	Group string `json:"group"`
}

DeleteUserFromGroupJSONBody defines parameters for DeleteUserFromGroup.

type DeleteUserFromGroupJSONRequestBody

type DeleteUserFromGroupJSONRequestBody DeleteUserFromGroupJSONBody

DeleteUserFromGroupJSONRequestBody defines body for DeleteUserFromGroup for application/json ContentType.

type DeleteUserFromGroupRequestObject

type DeleteUserFromGroupRequestObject struct {
	UserID UserID `json:"user_id"`
	Body   *DeleteUserFromGroupJSONRequestBody
}

type DeleteUserFromGroupResponseObject

type DeleteUserFromGroupResponseObject interface {
	VisitDeleteUserFromGroupResponse(w http.ResponseWriter) error
}

type DeleteUserRequestObject

type DeleteUserRequestObject struct {
	UserID UserID `json:"user_id"`
}

type DeleteUserResponseObject

type DeleteUserResponseObject interface {
	VisitDeleteUserResponse(w http.ResponseWriter) error
}

type Group

type Group struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	ID        *string    `json:"id,omitempty"`
	Name      *string    `json:"name,omitempty"`
	Slug      *string    `json:"slug,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

Group Model to represent group

type GroupID

type GroupID = string

GroupID defines model for GroupParam.

type GroupResponse

type GroupResponse = Group

GroupResponse Model to represent group

type GroupResponseJSONResponse

type GroupResponseJSONResponse Group

type GroupUserDropBody

type GroupUserDropBody struct {
	User string `json:"user"`
}

GroupUserDropBody defines model for GroupUserDropBody.

type GroupUserPermBody

type GroupUserPermBody struct {
	Perm string `json:"perm"`
	User string `json:"user"`
}

GroupUserPermBody defines model for GroupUserPermBody.

type GroupUsersResponse

type GroupUsersResponse struct {
	// Group Model to represent group
	Group  *Group      `json:"group,omitempty"`
	Limit  int64       `json:"limit"`
	Offset int64       `json:"offset"`
	Total  int64       `json:"total"`
	Users  []UserGroup `json:"users"`
}

GroupUsersResponse defines model for GroupUsersResponse.

type GroupUsersResponseJSONResponse

type GroupUsersResponseJSONResponse struct {
	// Group Model to represent group
	Group  *Group      `json:"group,omitempty"`
	Limit  int64       `json:"limit"`
	Offset int64       `json:"offset"`
	Total  int64       `json:"total"`
	Users  []UserGroup `json:"users"`
}

type GroupsResponse

type GroupsResponse struct {
	Groups []Group `json:"groups"`
	Limit  int64   `json:"limit"`
	Offset int64   `json:"offset"`
	Total  int64   `json:"total"`
}

GroupsResponse defines model for GroupsResponse.

type GroupsResponseJSONResponse

type GroupsResponseJSONResponse struct {
	Groups []Group `json:"groups"`
	Limit  int64   `json:"limit"`
	Offset int64   `json:"offset"`
	Total  int64   `json:"total"`
}

type InternalServerError

type InternalServerError = Notification

InternalServerError Generic response for errors and validations

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse Notification

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type InvalidTokenError

type InvalidTokenError = Notification

InvalidTokenError Generic response for errors and validations

type InvalidTokenErrorJSONResponse

type InvalidTokenErrorJSONResponse Notification

type ListGroupUsers200JSONResponse

type ListGroupUsers200JSONResponse struct{ GroupUsersResponseJSONResponse }

func (ListGroupUsers200JSONResponse) VisitListGroupUsersResponse

func (response ListGroupUsers200JSONResponse) VisitListGroupUsersResponse(w http.ResponseWriter) error

type ListGroupUsers403JSONResponse

type ListGroupUsers403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ListGroupUsers403JSONResponse) VisitListGroupUsersResponse

func (response ListGroupUsers403JSONResponse) VisitListGroupUsersResponse(w http.ResponseWriter) error

type ListGroupUsers404JSONResponse

type ListGroupUsers404JSONResponse struct{ NotFoundErrorJSONResponse }

func (ListGroupUsers404JSONResponse) VisitListGroupUsersResponse

func (response ListGroupUsers404JSONResponse) VisitListGroupUsersResponse(w http.ResponseWriter) error

type ListGroupUsers500JSONResponse

type ListGroupUsers500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListGroupUsers500JSONResponse) VisitListGroupUsersResponse

func (response ListGroupUsers500JSONResponse) VisitListGroupUsersResponse(w http.ResponseWriter) error

type ListGroupUsersParams

type ListGroupUsersParams struct {
	// Search Search query
	Search *SearchQueryParam `form:"search,omitempty" json:"search,omitempty"`

	// Sort Sorting column
	Sort *SortColumnParam `form:"sort,omitempty" json:"sort,omitempty"`

	// Order Sorting order
	Order *ListGroupUsersParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Limit Paging limit
	Limit *PagingLimitParam `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Paging offset
	Offset *PagingOffsetParam `form:"offset,omitempty" json:"offset,omitempty"`
}

ListGroupUsersParams defines parameters for ListGroupUsers.

type ListGroupUsersParamsOrder

type ListGroupUsersParamsOrder string

ListGroupUsersParamsOrder defines parameters for ListGroupUsers.

const (
	ListGroupUsersParamsOrderAsc  ListGroupUsersParamsOrder = "asc"
	ListGroupUsersParamsOrderDesc ListGroupUsersParamsOrder = "desc"
)

Defines values for ListGroupUsersParamsOrder.

type ListGroupUsersRequestObject

type ListGroupUsersRequestObject struct {
	GroupID GroupID `json:"group_id"`
	Params  ListGroupUsersParams
}

type ListGroupUsersResponseObject

type ListGroupUsersResponseObject interface {
	VisitListGroupUsersResponse(w http.ResponseWriter) error
}

type ListGroups200JSONResponse

type ListGroups200JSONResponse struct{ GroupsResponseJSONResponse }

func (ListGroups200JSONResponse) VisitListGroupsResponse

func (response ListGroups200JSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error

type ListGroups403JSONResponse

type ListGroups403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ListGroups403JSONResponse) VisitListGroupsResponse

func (response ListGroups403JSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error

type ListGroups500JSONResponse

type ListGroups500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListGroups500JSONResponse) VisitListGroupsResponse

func (response ListGroups500JSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error

type ListGroupsParams

type ListGroupsParams struct {
	// Search Search query
	Search *SearchQueryParam `form:"search,omitempty" json:"search,omitempty"`

	// Sort Sorting column
	Sort *SortColumnParam `form:"sort,omitempty" json:"sort,omitempty"`

	// Order Sorting order
	Order *ListGroupsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Limit Paging limit
	Limit *PagingLimitParam `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Paging offset
	Offset *PagingOffsetParam `form:"offset,omitempty" json:"offset,omitempty"`
}

ListGroupsParams defines parameters for ListGroups.

type ListGroupsParamsOrder

type ListGroupsParamsOrder string

ListGroupsParamsOrder defines parameters for ListGroups.

const (
	ListGroupsParamsOrderAsc  ListGroupsParamsOrder = "asc"
	ListGroupsParamsOrderDesc ListGroupsParamsOrder = "desc"
)

Defines values for ListGroupsParamsOrder.

type ListGroupsRequestObject

type ListGroupsRequestObject struct {
	Params ListGroupsParams
}

type ListGroupsResponseObject

type ListGroupsResponseObject interface {
	VisitListGroupsResponse(w http.ResponseWriter) error
}

type ListProviders200JSONResponse

type ListProviders200JSONResponse struct{ ProvidersResponseJSONResponse }

func (ListProviders200JSONResponse) VisitListProvidersResponse

func (response ListProviders200JSONResponse) VisitListProvidersResponse(w http.ResponseWriter) error

type ListProvidersRequestObject

type ListProvidersRequestObject struct {
}

type ListProvidersResponseObject

type ListProvidersResponseObject interface {
	VisitListProvidersResponse(w http.ResponseWriter) error
}

type ListUserGroups200JSONResponse

type ListUserGroups200JSONResponse struct{ UserGroupsResponseJSONResponse }

func (ListUserGroups200JSONResponse) VisitListUserGroupsResponse

func (response ListUserGroups200JSONResponse) VisitListUserGroupsResponse(w http.ResponseWriter) error

type ListUserGroups403JSONResponse

type ListUserGroups403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ListUserGroups403JSONResponse) VisitListUserGroupsResponse

func (response ListUserGroups403JSONResponse) VisitListUserGroupsResponse(w http.ResponseWriter) error

type ListUserGroups404JSONResponse

type ListUserGroups404JSONResponse struct{ NotFoundErrorJSONResponse }

func (ListUserGroups404JSONResponse) VisitListUserGroupsResponse

func (response ListUserGroups404JSONResponse) VisitListUserGroupsResponse(w http.ResponseWriter) error

type ListUserGroups500JSONResponse

type ListUserGroups500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListUserGroups500JSONResponse) VisitListUserGroupsResponse

func (response ListUserGroups500JSONResponse) VisitListUserGroupsResponse(w http.ResponseWriter) error

type ListUserGroupsParams

type ListUserGroupsParams struct {
	// Search Search query
	Search *SearchQueryParam `form:"search,omitempty" json:"search,omitempty"`

	// Sort Sorting column
	Sort *SortColumnParam `form:"sort,omitempty" json:"sort,omitempty"`

	// Order Sorting order
	Order *ListUserGroupsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Limit Paging limit
	Limit *PagingLimitParam `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Paging offset
	Offset *PagingOffsetParam `form:"offset,omitempty" json:"offset,omitempty"`
}

ListUserGroupsParams defines parameters for ListUserGroups.

type ListUserGroupsParamsOrder

type ListUserGroupsParamsOrder string

ListUserGroupsParamsOrder defines parameters for ListUserGroups.

const (
	Asc  ListUserGroupsParamsOrder = "asc"
	Desc ListUserGroupsParamsOrder = "desc"
)

Defines values for ListUserGroupsParamsOrder.

type ListUserGroupsRequestObject

type ListUserGroupsRequestObject struct {
	UserID UserID `json:"user_id"`
	Params ListUserGroupsParams
}

type ListUserGroupsResponseObject

type ListUserGroupsResponseObject interface {
	VisitListUserGroupsResponse(w http.ResponseWriter) error
}

type ListUsers200JSONResponse

type ListUsers200JSONResponse struct{ UsersResponseJSONResponse }

func (ListUsers200JSONResponse) VisitListUsersResponse

func (response ListUsers200JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error

type ListUsers403JSONResponse

type ListUsers403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ListUsers403JSONResponse) VisitListUsersResponse

func (response ListUsers403JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error

type ListUsers500JSONResponse

type ListUsers500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListUsers500JSONResponse) VisitListUsersResponse

func (response ListUsers500JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error

type ListUsersParams

type ListUsersParams struct {
	// Search Search query
	Search *SearchQueryParam `form:"search,omitempty" json:"search,omitempty"`

	// Sort Sorting column
	Sort *SortColumnParam `form:"sort,omitempty" json:"sort,omitempty"`

	// Order Sorting order
	Order *ListUsersParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Limit Paging limit
	Limit *PagingLimitParam `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Paging offset
	Offset *PagingOffsetParam `form:"offset,omitempty" json:"offset,omitempty"`
}

ListUsersParams defines parameters for ListUsers.

type ListUsersParamsOrder

type ListUsersParamsOrder string

ListUsersParamsOrder defines parameters for ListUsers.

const (
	ListUsersParamsOrderAsc  ListUsersParamsOrder = "asc"
	ListUsersParamsOrderDesc ListUsersParamsOrder = "desc"
)

Defines values for ListUsersParamsOrder.

type ListUsersRequestObject

type ListUsersRequestObject struct {
	Params ListUsersParams
}

type ListUsersResponseObject

type ListUsersResponseObject interface {
	VisitListUsersResponse(w http.ResponseWriter) error
}

type LoginAuth200JSONResponse

type LoginAuth200JSONResponse struct{ LoginResponseJSONResponse }

func (LoginAuth200JSONResponse) VisitLoginAuthResponse

func (response LoginAuth200JSONResponse) VisitLoginAuthResponse(w http.ResponseWriter) error

type LoginAuth401JSONResponse

type LoginAuth401JSONResponse struct {
	BadCredentialsErrorJSONResponse
}

func (LoginAuth401JSONResponse) VisitLoginAuthResponse

func (response LoginAuth401JSONResponse) VisitLoginAuthResponse(w http.ResponseWriter) error

type LoginAuth500JSONResponse

type LoginAuth500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (LoginAuth500JSONResponse) VisitLoginAuthResponse

func (response LoginAuth500JSONResponse) VisitLoginAuthResponse(w http.ResponseWriter) error

type LoginAuthBody

type LoginAuthBody struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

LoginAuthBody defines model for LoginAuthBody.

type LoginAuthJSONBody

type LoginAuthJSONBody struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

LoginAuthJSONBody defines parameters for LoginAuth.

type LoginAuthJSONRequestBody

type LoginAuthJSONRequestBody LoginAuthJSONBody

LoginAuthJSONRequestBody defines body for LoginAuth for application/json ContentType.

type LoginAuthRequestObject

type LoginAuthRequestObject struct {
	Body *LoginAuthJSONRequestBody
}

type LoginAuthResponseObject

type LoginAuthResponseObject interface {
	VisitLoginAuthResponse(w http.ResponseWriter) error
}

type LoginResponse

type LoginResponse = AuthToken

LoginResponse defines model for LoginResponse.

type LoginResponseJSONResponse

type LoginResponseJSONResponse AuthToken

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotAttachedError

type NotAttachedError = Notification

NotAttachedError Generic response for errors and validations

type NotAttachedErrorJSONResponse

type NotAttachedErrorJSONResponse Notification

type NotAuthorizedError

type NotAuthorizedError = Notification

NotAuthorizedError Generic response for errors and validations

type NotAuthorizedErrorJSONResponse

type NotAuthorizedErrorJSONResponse Notification

type NotFoundError

type NotFoundError = Notification

NotFoundError Generic response for errors and validations

type NotFoundErrorJSONResponse

type NotFoundErrorJSONResponse Notification

type Notification

type Notification struct {
	Errors  *[]Validation `json:"errors,omitempty"`
	Message *string       `json:"message,omitempty"`
	Status  *int          `json:"status,omitempty"`
}

Notification Generic response for errors and validations

type PagingLimitParam

type PagingLimitParam = int

PagingLimitParam defines model for PagingLimitParam.

type PagingOffsetParam

type PagingOffsetParam = int

PagingOffsetParam defines model for PagingOffsetParam.

type PermitGroupUser200JSONResponse

type PermitGroupUser200JSONResponse struct{ SuccessMessageJSONResponse }

func (PermitGroupUser200JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser200JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUser403JSONResponse

type PermitGroupUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (PermitGroupUser403JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser403JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUser404JSONResponse

type PermitGroupUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (PermitGroupUser404JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser404JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUser412JSONResponse

type PermitGroupUser412JSONResponse struct{ NotAttachedErrorJSONResponse }

func (PermitGroupUser412JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser412JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUser422JSONResponse

type PermitGroupUser422JSONResponse struct{ ValidationErrorJSONResponse }

func (PermitGroupUser422JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser422JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUser500JSONResponse

type PermitGroupUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (PermitGroupUser500JSONResponse) VisitPermitGroupUserResponse

func (response PermitGroupUser500JSONResponse) VisitPermitGroupUserResponse(w http.ResponseWriter) error

type PermitGroupUserJSONBody

type PermitGroupUserJSONBody struct {
	Perm string `json:"perm"`
	User string `json:"user"`
}

PermitGroupUserJSONBody defines parameters for PermitGroupUser.

type PermitGroupUserJSONRequestBody

type PermitGroupUserJSONRequestBody PermitGroupUserJSONBody

PermitGroupUserJSONRequestBody defines body for PermitGroupUser for application/json ContentType.

type PermitGroupUserRequestObject

type PermitGroupUserRequestObject struct {
	GroupID GroupID `json:"group_id"`
	Body    *PermitGroupUserJSONRequestBody
}

type PermitGroupUserResponseObject

type PermitGroupUserResponseObject interface {
	VisitPermitGroupUserResponse(w http.ResponseWriter) error
}

type PermitUserGroup200JSONResponse

type PermitUserGroup200JSONResponse struct{ SuccessMessageJSONResponse }

func (PermitUserGroup200JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup200JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroup403JSONResponse

type PermitUserGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (PermitUserGroup403JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup403JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroup404JSONResponse

type PermitUserGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (PermitUserGroup404JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup404JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroup412JSONResponse

type PermitUserGroup412JSONResponse struct{ NotAttachedErrorJSONResponse }

func (PermitUserGroup412JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup412JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroup422JSONResponse

type PermitUserGroup422JSONResponse struct{ ValidationErrorJSONResponse }

func (PermitUserGroup422JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup422JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroup500JSONResponse

type PermitUserGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (PermitUserGroup500JSONResponse) VisitPermitUserGroupResponse

func (response PermitUserGroup500JSONResponse) VisitPermitUserGroupResponse(w http.ResponseWriter) error

type PermitUserGroupJSONBody

type PermitUserGroupJSONBody struct {
	Group string `json:"group"`
	Perm  string `json:"perm"`
}

PermitUserGroupJSONBody defines parameters for PermitUserGroup.

type PermitUserGroupJSONRequestBody

type PermitUserGroupJSONRequestBody PermitUserGroupJSONBody

PermitUserGroupJSONRequestBody defines body for PermitUserGroup for application/json ContentType.

type PermitUserGroupRequestObject

type PermitUserGroupRequestObject struct {
	UserID UserID `json:"user_id"`
	Body   *PermitUserGroupJSONRequestBody
}

type PermitUserGroupResponseObject

type PermitUserGroupResponseObject interface {
	VisitPermitUserGroupResponse(w http.ResponseWriter) error
}

type Profile

type Profile struct {
	Active    *bool        `json:"active,omitempty"`
	Admin     *bool        `json:"admin,omitempty"`
	Auths     *[]UserAuth  `json:"auths,omitempty"`
	CreatedAt *time.Time   `json:"created_at,omitempty"`
	Email     *string      `json:"email,omitempty"`
	Fullname  *string      `json:"fullname,omitempty"`
	Groups    *[]UserGroup `json:"groups,omitempty"`
	ID        *string      `json:"id,omitempty"`
	Password  *string      `json:"password,omitempty"`
	Profile   *string      `json:"profile,omitempty"`
	UpdatedAt *time.Time   `json:"updated_at,omitempty"`
	Username  *string      `json:"username,omitempty"`
}

Profile Model to represent profile

type ProfileResponse

type ProfileResponse = Profile

ProfileResponse Model to represent profile

type ProfileResponseJSONResponse

type ProfileResponseJSONResponse Profile

type Provider

type Provider struct {
	Display *string `json:"display,omitempty"`
	Driver  *string `json:"driver,omitempty"`
	Icon    *string `json:"icon,omitempty"`
	Name    *string `json:"name,omitempty"`
}

Provider Model to represent auth provider

type ProvidersResponse

type ProvidersResponse struct {
	Providers []Provider `json:"providers"`
	Total     int64      `json:"total"`
}

ProvidersResponse defines model for ProvidersResponse.

type ProvidersResponseJSONResponse

type ProvidersResponseJSONResponse struct {
	Providers []Provider `json:"providers"`
	Total     int64      `json:"total"`
}

type RefreshAuth200JSONResponse

type RefreshAuth200JSONResponse struct{ RefreshResponseJSONResponse }

func (RefreshAuth200JSONResponse) VisitRefreshAuthResponse

func (response RefreshAuth200JSONResponse) VisitRefreshAuthResponse(w http.ResponseWriter) error

type RefreshAuth401JSONResponse

type RefreshAuth401JSONResponse struct{ InvalidTokenErrorJSONResponse }

func (RefreshAuth401JSONResponse) VisitRefreshAuthResponse

func (response RefreshAuth401JSONResponse) VisitRefreshAuthResponse(w http.ResponseWriter) error

type RefreshAuth500JSONResponse

type RefreshAuth500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (RefreshAuth500JSONResponse) VisitRefreshAuthResponse

func (response RefreshAuth500JSONResponse) VisitRefreshAuthResponse(w http.ResponseWriter) error

type RefreshAuthRequestObject

type RefreshAuthRequestObject struct {
}

type RefreshAuthResponseObject

type RefreshAuthResponseObject interface {
	VisitRefreshAuthResponse(w http.ResponseWriter) error
}

type RefreshResponse

type RefreshResponse = AuthToken

RefreshResponse defines model for RefreshResponse.

type RefreshResponseJSONResponse

type RefreshResponseJSONResponse AuthToken

type RequestProvider308TexthtmlResponse

type RequestProvider308TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (RequestProvider308TexthtmlResponse) VisitRequestProviderResponse

func (response RequestProvider308TexthtmlResponse) VisitRequestProviderResponse(w http.ResponseWriter) error

type RequestProvider404TexthtmlResponse

type RequestProvider404TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (RequestProvider404TexthtmlResponse) VisitRequestProviderResponse

func (response RequestProvider404TexthtmlResponse) VisitRequestProviderResponse(w http.ResponseWriter) error

type RequestProvider500TexthtmlResponse

type RequestProvider500TexthtmlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (RequestProvider500TexthtmlResponse) VisitRequestProviderResponse

func (response RequestProvider500TexthtmlResponse) VisitRequestProviderResponse(w http.ResponseWriter) error

type RequestProviderRequestObject

type RequestProviderRequestObject struct {
	Provider AuthProviderParam `json:"provider"`
}

type RequestProviderResponseObject

type RequestProviderResponseObject interface {
	VisitRequestProviderResponse(w http.ResponseWriter) error
}

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 SearchQueryParam

type SearchQueryParam = string

SearchQueryParam defines model for SearchQueryParam.

type ServerInterface

type ServerInterface interface {
	// Authenticate an user by credentials
	// (POST /auth/login)
	LoginAuth(w http.ResponseWriter, r *http.Request)
	// Fetch the available auth providers
	// (GET /auth/providers)
	ListProviders(w http.ResponseWriter, r *http.Request)
	// Refresh an auth token before it expires
	// (GET /auth/refresh)
	RefreshAuth(w http.ResponseWriter, r *http.Request)
	// Verify validity for an authentication token
	// (GET /auth/verify)
	VerifyAuth(w http.ResponseWriter, r *http.Request)
	// Callback to parse the defined provider
	// (GET /auth/{provider}/callback)
	CallbackProvider(w http.ResponseWriter, r *http.Request, provider AuthProviderParam, params CallbackProviderParams)
	// Request the redirect to defined provider
	// (GET /auth/{provider}/request)
	RequestProvider(w http.ResponseWriter, r *http.Request, provider AuthProviderParam)
	// Fetch all available groups
	// (GET /groups)
	ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams)
	// Create a new group
	// (POST /groups)
	CreateGroup(w http.ResponseWriter, r *http.Request)
	// Delete a specific group
	// (DELETE /groups/{group_id})
	DeleteGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Fetch a specific group
	// (GET /groups/{group_id})
	ShowGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Update a specific group
	// (PUT /groups/{group_id})
	UpdateGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Unlink a user from group
	// (DELETE /groups/{group_id}/users)
	DeleteGroupFromUser(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Fetch all users attached to group
	// (GET /groups/{group_id}/users)
	ListGroupUsers(w http.ResponseWriter, r *http.Request, groupID GroupID, params ListGroupUsersParams)
	// Attach a user to group
	// (POST /groups/{group_id}/users)
	AttachGroupToUser(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Update user perms for group
	// (PUT /groups/{group_id}/users)
	PermitGroupUser(w http.ResponseWriter, r *http.Request, groupID GroupID)
	// Fetch profile details of the personal account
	// (GET /profile/self)
	ShowProfile(w http.ResponseWriter, r *http.Request)
	// Update your own profile information
	// (PUT /profile/self)
	UpdateProfile(w http.ResponseWriter, r *http.Request)
	// Retrieve an unlimited auth token
	// (GET /profile/token)
	TokenProfile(w http.ResponseWriter, r *http.Request)
	// Fetch all available users
	// (GET /users)
	ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams)
	// Create a new user
	// (POST /users)
	CreateUser(w http.ResponseWriter, r *http.Request)
	// Delete a specific user
	// (DELETE /users/{user_id})
	DeleteUser(w http.ResponseWriter, r *http.Request, userID UserID)
	// Fetch a specific user
	// (GET /users/{user_id})
	ShowUser(w http.ResponseWriter, r *http.Request, userID UserID)
	// Update a specific user
	// (PUT /users/{user_id})
	UpdateUser(w http.ResponseWriter, r *http.Request, userID UserID)
	// Unlink a group from user
	// (DELETE /users/{user_id}/groups)
	DeleteUserFromGroup(w http.ResponseWriter, r *http.Request, userID UserID)
	// Fetch all groups attached to user
	// (GET /users/{user_id}/groups)
	ListUserGroups(w http.ResponseWriter, r *http.Request, userID UserID, params ListUserGroupsParams)
	// Attach a group to user
	// (POST /users/{user_id}/groups)
	AttachUserToGroup(w http.ResponseWriter, r *http.Request, userID UserID)
	// Update group perms for user
	// (PUT /users/{user_id}/groups)
	PermitUserGroup(w http.ResponseWriter, r *http.Request, userID UserID)
}

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

func (siw *ServerInterfaceWrapper) AttachGroupToUser(w http.ResponseWriter, r *http.Request)

AttachGroupToUser operation middleware

func (*ServerInterfaceWrapper) AttachUserToGroup

func (siw *ServerInterfaceWrapper) AttachUserToGroup(w http.ResponseWriter, r *http.Request)

AttachUserToGroup operation middleware

func (*ServerInterfaceWrapper) CallbackProvider

func (siw *ServerInterfaceWrapper) CallbackProvider(w http.ResponseWriter, r *http.Request)

CallbackProvider operation middleware

func (*ServerInterfaceWrapper) CreateGroup

func (siw *ServerInterfaceWrapper) CreateGroup(w http.ResponseWriter, r *http.Request)

CreateGroup operation middleware

func (*ServerInterfaceWrapper) CreateUser

func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)

CreateUser operation middleware

func (*ServerInterfaceWrapper) DeleteGroup

func (siw *ServerInterfaceWrapper) DeleteGroup(w http.ResponseWriter, r *http.Request)

DeleteGroup operation middleware

func (*ServerInterfaceWrapper) DeleteGroupFromUser

func (siw *ServerInterfaceWrapper) DeleteGroupFromUser(w http.ResponseWriter, r *http.Request)

DeleteGroupFromUser operation middleware

func (*ServerInterfaceWrapper) DeleteUser

func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)

DeleteUser operation middleware

func (*ServerInterfaceWrapper) DeleteUserFromGroup

func (siw *ServerInterfaceWrapper) DeleteUserFromGroup(w http.ResponseWriter, r *http.Request)

DeleteUserFromGroup operation middleware

func (*ServerInterfaceWrapper) ListGroupUsers

func (siw *ServerInterfaceWrapper) ListGroupUsers(w http.ResponseWriter, r *http.Request)

ListGroupUsers operation middleware

func (*ServerInterfaceWrapper) ListGroups

func (siw *ServerInterfaceWrapper) ListGroups(w http.ResponseWriter, r *http.Request)

ListGroups operation middleware

func (*ServerInterfaceWrapper) ListProviders

func (siw *ServerInterfaceWrapper) ListProviders(w http.ResponseWriter, r *http.Request)

ListProviders operation middleware

func (*ServerInterfaceWrapper) ListUserGroups

func (siw *ServerInterfaceWrapper) ListUserGroups(w http.ResponseWriter, r *http.Request)

ListUserGroups operation middleware

func (*ServerInterfaceWrapper) ListUsers

func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)

ListUsers operation middleware

func (*ServerInterfaceWrapper) LoginAuth

func (siw *ServerInterfaceWrapper) LoginAuth(w http.ResponseWriter, r *http.Request)

LoginAuth operation middleware

func (*ServerInterfaceWrapper) PermitGroupUser

func (siw *ServerInterfaceWrapper) PermitGroupUser(w http.ResponseWriter, r *http.Request)

PermitGroupUser operation middleware

func (*ServerInterfaceWrapper) PermitUserGroup

func (siw *ServerInterfaceWrapper) PermitUserGroup(w http.ResponseWriter, r *http.Request)

PermitUserGroup operation middleware

func (*ServerInterfaceWrapper) RefreshAuth

func (siw *ServerInterfaceWrapper) RefreshAuth(w http.ResponseWriter, r *http.Request)

RefreshAuth operation middleware

func (*ServerInterfaceWrapper) RequestProvider

func (siw *ServerInterfaceWrapper) RequestProvider(w http.ResponseWriter, r *http.Request)

RequestProvider operation middleware

func (*ServerInterfaceWrapper) ShowGroup

func (siw *ServerInterfaceWrapper) ShowGroup(w http.ResponseWriter, r *http.Request)

ShowGroup operation middleware

func (*ServerInterfaceWrapper) ShowProfile

func (siw *ServerInterfaceWrapper) ShowProfile(w http.ResponseWriter, r *http.Request)

ShowProfile operation middleware

func (*ServerInterfaceWrapper) ShowUser

func (siw *ServerInterfaceWrapper) ShowUser(w http.ResponseWriter, r *http.Request)

ShowUser operation middleware

func (*ServerInterfaceWrapper) TokenProfile

func (siw *ServerInterfaceWrapper) TokenProfile(w http.ResponseWriter, r *http.Request)

TokenProfile operation middleware

func (*ServerInterfaceWrapper) UpdateGroup

func (siw *ServerInterfaceWrapper) UpdateGroup(w http.ResponseWriter, r *http.Request)

UpdateGroup operation middleware

func (*ServerInterfaceWrapper) UpdateProfile

func (siw *ServerInterfaceWrapper) UpdateProfile(w http.ResponseWriter, r *http.Request)

UpdateProfile operation middleware

func (*ServerInterfaceWrapper) UpdateUser

func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request)

UpdateUser operation middleware

func (*ServerInterfaceWrapper) VerifyAuth

func (siw *ServerInterfaceWrapper) VerifyAuth(w http.ResponseWriter, r *http.Request)

VerifyAuth operation middleware

type ShowGroup200JSONResponse

type ShowGroup200JSONResponse struct{ GroupResponseJSONResponse }

func (ShowGroup200JSONResponse) VisitShowGroupResponse

func (response ShowGroup200JSONResponse) VisitShowGroupResponse(w http.ResponseWriter) error

type ShowGroup403JSONResponse

type ShowGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ShowGroup403JSONResponse) VisitShowGroupResponse

func (response ShowGroup403JSONResponse) VisitShowGroupResponse(w http.ResponseWriter) error

type ShowGroup404JSONResponse

type ShowGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (ShowGroup404JSONResponse) VisitShowGroupResponse

func (response ShowGroup404JSONResponse) VisitShowGroupResponse(w http.ResponseWriter) error

type ShowGroup500JSONResponse

type ShowGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ShowGroup500JSONResponse) VisitShowGroupResponse

func (response ShowGroup500JSONResponse) VisitShowGroupResponse(w http.ResponseWriter) error

type ShowGroupRequestObject

type ShowGroupRequestObject struct {
	GroupID GroupID `json:"group_id"`
}

type ShowGroupResponseObject

type ShowGroupResponseObject interface {
	VisitShowGroupResponse(w http.ResponseWriter) error
}

type ShowProfile200JSONResponse

type ShowProfile200JSONResponse struct{ ProfileResponseJSONResponse }

func (ShowProfile200JSONResponse) VisitShowProfileResponse

func (response ShowProfile200JSONResponse) VisitShowProfileResponse(w http.ResponseWriter) error

type ShowProfile403JSONResponse

type ShowProfile403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ShowProfile403JSONResponse) VisitShowProfileResponse

func (response ShowProfile403JSONResponse) VisitShowProfileResponse(w http.ResponseWriter) error

type ShowProfile500JSONResponse

type ShowProfile500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ShowProfile500JSONResponse) VisitShowProfileResponse

func (response ShowProfile500JSONResponse) VisitShowProfileResponse(w http.ResponseWriter) error

type ShowProfileRequestObject

type ShowProfileRequestObject struct {
}

type ShowProfileResponseObject

type ShowProfileResponseObject interface {
	VisitShowProfileResponse(w http.ResponseWriter) error
}

type ShowUser200JSONResponse

type ShowUser200JSONResponse struct{ UserResponseJSONResponse }

func (ShowUser200JSONResponse) VisitShowUserResponse

func (response ShowUser200JSONResponse) VisitShowUserResponse(w http.ResponseWriter) error

type ShowUser403JSONResponse

type ShowUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (ShowUser403JSONResponse) VisitShowUserResponse

func (response ShowUser403JSONResponse) VisitShowUserResponse(w http.ResponseWriter) error

type ShowUser404JSONResponse

type ShowUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (ShowUser404JSONResponse) VisitShowUserResponse

func (response ShowUser404JSONResponse) VisitShowUserResponse(w http.ResponseWriter) error

type ShowUser500JSONResponse

type ShowUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ShowUser500JSONResponse) VisitShowUserResponse

func (response ShowUser500JSONResponse) VisitShowUserResponse(w http.ResponseWriter) error

type ShowUserRequestObject

type ShowUserRequestObject struct {
	UserID UserID `json:"user_id"`
}

type ShowUserResponseObject

type ShowUserResponseObject interface {
	VisitShowUserResponse(w http.ResponseWriter) error
}

type SortColumnParam

type SortColumnParam = string

SortColumnParam defines model for SortColumnParam.

type SortOrderParam

type SortOrderParam string

SortOrderParam defines model for SortOrderParam.

const (
	SortOrderParamAsc  SortOrderParam = "asc"
	SortOrderParamDesc SortOrderParam = "desc"
)

Defines values for SortOrderParam.

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 StrictServerInterface

type StrictServerInterface interface {
	// Authenticate an user by credentials
	// (POST /auth/login)
	LoginAuth(ctx context.Context, request LoginAuthRequestObject) (LoginAuthResponseObject, error)
	// Fetch the available auth providers
	// (GET /auth/providers)
	ListProviders(ctx context.Context, request ListProvidersRequestObject) (ListProvidersResponseObject, error)
	// Refresh an auth token before it expires
	// (GET /auth/refresh)
	RefreshAuth(ctx context.Context, request RefreshAuthRequestObject) (RefreshAuthResponseObject, error)
	// Verify validity for an authentication token
	// (GET /auth/verify)
	VerifyAuth(ctx context.Context, request VerifyAuthRequestObject) (VerifyAuthResponseObject, error)
	// Callback to parse the defined provider
	// (GET /auth/{provider}/callback)
	CallbackProvider(ctx context.Context, request CallbackProviderRequestObject) (CallbackProviderResponseObject, error)
	// Request the redirect to defined provider
	// (GET /auth/{provider}/request)
	RequestProvider(ctx context.Context, request RequestProviderRequestObject) (RequestProviderResponseObject, error)
	// Fetch all available groups
	// (GET /groups)
	ListGroups(ctx context.Context, request ListGroupsRequestObject) (ListGroupsResponseObject, error)
	// Create a new group
	// (POST /groups)
	CreateGroup(ctx context.Context, request CreateGroupRequestObject) (CreateGroupResponseObject, error)
	// Delete a specific group
	// (DELETE /groups/{group_id})
	DeleteGroup(ctx context.Context, request DeleteGroupRequestObject) (DeleteGroupResponseObject, error)
	// Fetch a specific group
	// (GET /groups/{group_id})
	ShowGroup(ctx context.Context, request ShowGroupRequestObject) (ShowGroupResponseObject, error)
	// Update a specific group
	// (PUT /groups/{group_id})
	UpdateGroup(ctx context.Context, request UpdateGroupRequestObject) (UpdateGroupResponseObject, error)
	// Unlink a user from group
	// (DELETE /groups/{group_id}/users)
	DeleteGroupFromUser(ctx context.Context, request DeleteGroupFromUserRequestObject) (DeleteGroupFromUserResponseObject, error)
	// Fetch all users attached to group
	// (GET /groups/{group_id}/users)
	ListGroupUsers(ctx context.Context, request ListGroupUsersRequestObject) (ListGroupUsersResponseObject, error)
	// Attach a user to group
	// (POST /groups/{group_id}/users)
	AttachGroupToUser(ctx context.Context, request AttachGroupToUserRequestObject) (AttachGroupToUserResponseObject, error)
	// Update user perms for group
	// (PUT /groups/{group_id}/users)
	PermitGroupUser(ctx context.Context, request PermitGroupUserRequestObject) (PermitGroupUserResponseObject, error)
	// Fetch profile details of the personal account
	// (GET /profile/self)
	ShowProfile(ctx context.Context, request ShowProfileRequestObject) (ShowProfileResponseObject, error)
	// Update your own profile information
	// (PUT /profile/self)
	UpdateProfile(ctx context.Context, request UpdateProfileRequestObject) (UpdateProfileResponseObject, error)
	// Retrieve an unlimited auth token
	// (GET /profile/token)
	TokenProfile(ctx context.Context, request TokenProfileRequestObject) (TokenProfileResponseObject, error)
	// Fetch all available users
	// (GET /users)
	ListUsers(ctx context.Context, request ListUsersRequestObject) (ListUsersResponseObject, error)
	// Create a new user
	// (POST /users)
	CreateUser(ctx context.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)
	// Delete a specific user
	// (DELETE /users/{user_id})
	DeleteUser(ctx context.Context, request DeleteUserRequestObject) (DeleteUserResponseObject, error)
	// Fetch a specific user
	// (GET /users/{user_id})
	ShowUser(ctx context.Context, request ShowUserRequestObject) (ShowUserResponseObject, error)
	// Update a specific user
	// (PUT /users/{user_id})
	UpdateUser(ctx context.Context, request UpdateUserRequestObject) (UpdateUserResponseObject, error)
	// Unlink a group from user
	// (DELETE /users/{user_id}/groups)
	DeleteUserFromGroup(ctx context.Context, request DeleteUserFromGroupRequestObject) (DeleteUserFromGroupResponseObject, error)
	// Fetch all groups attached to user
	// (GET /users/{user_id}/groups)
	ListUserGroups(ctx context.Context, request ListUserGroupsRequestObject) (ListUserGroupsResponseObject, error)
	// Attach a group to user
	// (POST /users/{user_id}/groups)
	AttachUserToGroup(ctx context.Context, request AttachUserToGroupRequestObject) (AttachUserToGroupResponseObject, error)
	// Update group perms for user
	// (PUT /users/{user_id}/groups)
	PermitUserGroup(ctx context.Context, request PermitUserGroupRequestObject) (PermitUserGroupResponseObject, error)
}

StrictServerInterface represents all server handlers.

type SuccessMessage

type SuccessMessage = Notification

SuccessMessage Generic response for errors and validations

type SuccessMessageJSONResponse

type SuccessMessageJSONResponse Notification

type TokenProfile200JSONResponse

type TokenProfile200JSONResponse struct{ TokenResponseJSONResponse }

func (TokenProfile200JSONResponse) VisitTokenProfileResponse

func (response TokenProfile200JSONResponse) VisitTokenProfileResponse(w http.ResponseWriter) error

type TokenProfile403JSONResponse

type TokenProfile403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (TokenProfile403JSONResponse) VisitTokenProfileResponse

func (response TokenProfile403JSONResponse) VisitTokenProfileResponse(w http.ResponseWriter) error

type TokenProfile500JSONResponse

type TokenProfile500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (TokenProfile500JSONResponse) VisitTokenProfileResponse

func (response TokenProfile500JSONResponse) VisitTokenProfileResponse(w http.ResponseWriter) error

type TokenProfileRequestObject

type TokenProfileRequestObject struct {
}

type TokenProfileResponseObject

type TokenProfileResponseObject interface {
	VisitTokenProfileResponse(w http.ResponseWriter) error
}

type TokenResponse

type TokenResponse = AuthToken

TokenResponse defines model for TokenResponse.

type TokenResponseJSONResponse

type TokenResponseJSONResponse AuthToken

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) AttachGroupToUser

func (_ Unimplemented) AttachGroupToUser(w http.ResponseWriter, r *http.Request, groupID GroupID)

Attach a user to group (POST /groups/{group_id}/users)

func (Unimplemented) AttachUserToGroup

func (_ Unimplemented) AttachUserToGroup(w http.ResponseWriter, r *http.Request, userID UserID)

Attach a group to user (POST /users/{user_id}/groups)

func (Unimplemented) CallbackProvider

func (_ Unimplemented) CallbackProvider(w http.ResponseWriter, r *http.Request, provider AuthProviderParam, params CallbackProviderParams)

Callback to parse the defined provider (GET /auth/{provider}/callback)

func (Unimplemented) CreateGroup

func (_ Unimplemented) CreateGroup(w http.ResponseWriter, r *http.Request)

Create a new group (POST /groups)

func (Unimplemented) CreateUser

func (_ Unimplemented) CreateUser(w http.ResponseWriter, r *http.Request)

Create a new user (POST /users)

func (Unimplemented) DeleteGroup

func (_ Unimplemented) DeleteGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)

Delete a specific group (DELETE /groups/{group_id})

func (Unimplemented) DeleteGroupFromUser

func (_ Unimplemented) DeleteGroupFromUser(w http.ResponseWriter, r *http.Request, groupID GroupID)

Unlink a user from group (DELETE /groups/{group_id}/users)

func (Unimplemented) DeleteUser

func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, userID UserID)

Delete a specific user (DELETE /users/{user_id})

func (Unimplemented) DeleteUserFromGroup

func (_ Unimplemented) DeleteUserFromGroup(w http.ResponseWriter, r *http.Request, userID UserID)

Unlink a group from user (DELETE /users/{user_id}/groups)

func (Unimplemented) ListGroupUsers

func (_ Unimplemented) ListGroupUsers(w http.ResponseWriter, r *http.Request, groupID GroupID, params ListGroupUsersParams)

Fetch all users attached to group (GET /groups/{group_id}/users)

func (Unimplemented) ListGroups

func (_ Unimplemented) ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams)

Fetch all available groups (GET /groups)

func (Unimplemented) ListProviders

func (_ Unimplemented) ListProviders(w http.ResponseWriter, r *http.Request)

Fetch the available auth providers (GET /auth/providers)

func (Unimplemented) ListUserGroups

func (_ Unimplemented) ListUserGroups(w http.ResponseWriter, r *http.Request, userID UserID, params ListUserGroupsParams)

Fetch all groups attached to user (GET /users/{user_id}/groups)

func (Unimplemented) ListUsers

func (_ Unimplemented) ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams)

Fetch all available users (GET /users)

func (Unimplemented) LoginAuth

func (_ Unimplemented) LoginAuth(w http.ResponseWriter, r *http.Request)

Authenticate an user by credentials (POST /auth/login)

func (Unimplemented) PermitGroupUser

func (_ Unimplemented) PermitGroupUser(w http.ResponseWriter, r *http.Request, groupID GroupID)

Update user perms for group (PUT /groups/{group_id}/users)

func (Unimplemented) PermitUserGroup

func (_ Unimplemented) PermitUserGroup(w http.ResponseWriter, r *http.Request, userID UserID)

Update group perms for user (PUT /users/{user_id}/groups)

func (Unimplemented) RefreshAuth

func (_ Unimplemented) RefreshAuth(w http.ResponseWriter, r *http.Request)

Refresh an auth token before it expires (GET /auth/refresh)

func (Unimplemented) RequestProvider

func (_ Unimplemented) RequestProvider(w http.ResponseWriter, r *http.Request, provider AuthProviderParam)

Request the redirect to defined provider (GET /auth/{provider}/request)

func (Unimplemented) ShowGroup

func (_ Unimplemented) ShowGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)

Fetch a specific group (GET /groups/{group_id})

func (Unimplemented) ShowProfile

func (_ Unimplemented) ShowProfile(w http.ResponseWriter, r *http.Request)

Fetch profile details of the personal account (GET /profile/self)

func (Unimplemented) ShowUser

func (_ Unimplemented) ShowUser(w http.ResponseWriter, r *http.Request, userID UserID)

Fetch a specific user (GET /users/{user_id})

func (Unimplemented) TokenProfile

func (_ Unimplemented) TokenProfile(w http.ResponseWriter, r *http.Request)

Retrieve an unlimited auth token (GET /profile/token)

func (Unimplemented) UpdateGroup

func (_ Unimplemented) UpdateGroup(w http.ResponseWriter, r *http.Request, groupID GroupID)

Update a specific group (PUT /groups/{group_id})

func (Unimplemented) UpdateProfile

func (_ Unimplemented) UpdateProfile(w http.ResponseWriter, r *http.Request)

Update your own profile information (PUT /profile/self)

func (Unimplemented) UpdateUser

func (_ Unimplemented) UpdateUser(w http.ResponseWriter, r *http.Request, userID UserID)

Update a specific user (PUT /users/{user_id})

func (Unimplemented) VerifyAuth

func (_ Unimplemented) VerifyAuth(w http.ResponseWriter, r *http.Request)

Verify validity for an authentication token (GET /auth/verify)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateGroup200JSONResponse

type UpdateGroup200JSONResponse struct{ GroupResponseJSONResponse }

func (UpdateGroup200JSONResponse) VisitUpdateGroupResponse

func (response UpdateGroup200JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error

type UpdateGroup403JSONResponse

type UpdateGroup403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (UpdateGroup403JSONResponse) VisitUpdateGroupResponse

func (response UpdateGroup403JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error

type UpdateGroup404JSONResponse

type UpdateGroup404JSONResponse struct{ NotFoundErrorJSONResponse }

func (UpdateGroup404JSONResponse) VisitUpdateGroupResponse

func (response UpdateGroup404JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error

type UpdateGroup422JSONResponse

type UpdateGroup422JSONResponse struct{ ValidationErrorJSONResponse }

func (UpdateGroup422JSONResponse) VisitUpdateGroupResponse

func (response UpdateGroup422JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error

type UpdateGroup500JSONResponse

type UpdateGroup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (UpdateGroup500JSONResponse) VisitUpdateGroupResponse

func (response UpdateGroup500JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error

type UpdateGroupBody

type UpdateGroupBody struct {
	Name *string `json:"name,omitempty"`
	Slug *string `json:"slug,omitempty"`
}

UpdateGroupBody defines model for UpdateGroupBody.

type UpdateGroupJSONBody

type UpdateGroupJSONBody struct {
	Name *string `json:"name,omitempty"`
	Slug *string `json:"slug,omitempty"`
}

UpdateGroupJSONBody defines parameters for UpdateGroup.

type UpdateGroupJSONRequestBody

type UpdateGroupJSONRequestBody UpdateGroupJSONBody

UpdateGroupJSONRequestBody defines body for UpdateGroup for application/json ContentType.

type UpdateGroupRequestObject

type UpdateGroupRequestObject struct {
	GroupID GroupID `json:"group_id"`
	Body    *UpdateGroupJSONRequestBody
}

type UpdateGroupResponseObject

type UpdateGroupResponseObject interface {
	VisitUpdateGroupResponse(w http.ResponseWriter) error
}

type UpdateProfile200JSONResponse

type UpdateProfile200JSONResponse struct{ ProfileResponseJSONResponse }

func (UpdateProfile200JSONResponse) VisitUpdateProfileResponse

func (response UpdateProfile200JSONResponse) VisitUpdateProfileResponse(w http.ResponseWriter) error

type UpdateProfile403JSONResponse

type UpdateProfile403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (UpdateProfile403JSONResponse) VisitUpdateProfileResponse

func (response UpdateProfile403JSONResponse) VisitUpdateProfileResponse(w http.ResponseWriter) error

type UpdateProfile422JSONResponse

type UpdateProfile422JSONResponse struct{ ValidationErrorJSONResponse }

func (UpdateProfile422JSONResponse) VisitUpdateProfileResponse

func (response UpdateProfile422JSONResponse) VisitUpdateProfileResponse(w http.ResponseWriter) error

type UpdateProfile500JSONResponse

type UpdateProfile500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (UpdateProfile500JSONResponse) VisitUpdateProfileResponse

func (response UpdateProfile500JSONResponse) VisitUpdateProfileResponse(w http.ResponseWriter) error

type UpdateProfileBody

type UpdateProfileBody struct {
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

UpdateProfileBody defines model for UpdateProfileBody.

type UpdateProfileJSONBody

type UpdateProfileJSONBody struct {
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

UpdateProfileJSONBody defines parameters for UpdateProfile.

type UpdateProfileJSONRequestBody

type UpdateProfileJSONRequestBody UpdateProfileJSONBody

UpdateProfileJSONRequestBody defines body for UpdateProfile for application/json ContentType.

type UpdateProfileRequestObject

type UpdateProfileRequestObject struct {
	Body *UpdateProfileJSONRequestBody
}

type UpdateProfileResponseObject

type UpdateProfileResponseObject interface {
	VisitUpdateProfileResponse(w http.ResponseWriter) error
}

type UpdateUser200JSONResponse

type UpdateUser200JSONResponse struct{ UserResponseJSONResponse }

func (UpdateUser200JSONResponse) VisitUpdateUserResponse

func (response UpdateUser200JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error

type UpdateUser403JSONResponse

type UpdateUser403JSONResponse struct{ NotAuthorizedErrorJSONResponse }

func (UpdateUser403JSONResponse) VisitUpdateUserResponse

func (response UpdateUser403JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error

type UpdateUser404JSONResponse

type UpdateUser404JSONResponse struct{ NotFoundErrorJSONResponse }

func (UpdateUser404JSONResponse) VisitUpdateUserResponse

func (response UpdateUser404JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error

type UpdateUser422JSONResponse

type UpdateUser422JSONResponse struct{ ValidationErrorJSONResponse }

func (UpdateUser422JSONResponse) VisitUpdateUserResponse

func (response UpdateUser422JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error

type UpdateUser500JSONResponse

type UpdateUser500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (UpdateUser500JSONResponse) VisitUpdateUserResponse

func (response UpdateUser500JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error

type UpdateUserBody

type UpdateUserBody struct {
	Active   *bool   `json:"active,omitempty"`
	Admin    *bool   `json:"admin,omitempty"`
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

UpdateUserBody defines model for UpdateUserBody.

type UpdateUserJSONBody

type UpdateUserJSONBody struct {
	Active   *bool   `json:"active,omitempty"`
	Admin    *bool   `json:"admin,omitempty"`
	Email    *string `json:"email,omitempty"`
	Fullname *string `json:"fullname,omitempty"`
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

UpdateUserJSONBody defines parameters for UpdateUser.

type UpdateUserJSONRequestBody

type UpdateUserJSONRequestBody UpdateUserJSONBody

UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.

type UpdateUserRequestObject

type UpdateUserRequestObject struct {
	UserID UserID `json:"user_id"`
	Body   *UpdateUserJSONRequestBody
}

type UpdateUserResponseObject

type UpdateUserResponseObject interface {
	VisitUpdateUserResponse(w http.ResponseWriter) error
}

type User

type User struct {
	Active    *bool       `json:"active,omitempty"`
	Admin     *bool       `json:"admin,omitempty"`
	Auths     *[]UserAuth `json:"auths,omitempty"`
	CreatedAt *time.Time  `json:"created_at,omitempty"`
	Email     *string     `json:"email,omitempty"`
	Fullname  *string     `json:"fullname,omitempty"`
	ID        *string     `json:"id,omitempty"`
	Password  *string     `json:"password,omitempty"`
	Profile   *string     `json:"profile,omitempty"`
	UpdatedAt *time.Time  `json:"updated_at,omitempty"`
	Username  *string     `json:"username,omitempty"`
}

User Model to represent user

type UserAuth

type UserAuth struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Provider  *string    `json:"provider,omitempty"`
	Ref       *string    `json:"ref,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

UserAuth Model to represent user auth

type UserGroup

type UserGroup struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Group Model to represent group
	Group     *Group         `json:"group,omitempty"`
	GroupID   string         `json:"group_id"`
	Perm      *UserGroupPerm `json:"perm,omitempty"`
	UpdatedAt *time.Time     `json:"updated_at,omitempty"`

	// User Model to represent user
	User   *User  `json:"user,omitempty"`
	UserID string `json:"user_id"`
}

UserGroup Model to represent user group

type UserGroupDropBody

type UserGroupDropBody struct {
	Group string `json:"group"`
}

UserGroupDropBody defines model for UserGroupDropBody.

type UserGroupPerm

type UserGroupPerm string

UserGroupPerm defines model for UserGroup.Perm.

const (
	UserGroupPermAdmin UserGroupPerm = "admin"
	UserGroupPermOwner UserGroupPerm = "owner"
	UserGroupPermUser  UserGroupPerm = "user"
)

Defines values for UserGroupPerm.

type UserGroupPermBody

type UserGroupPermBody struct {
	Group string `json:"group"`
	Perm  string `json:"perm"`
}

UserGroupPermBody defines model for UserGroupPermBody.

type UserGroupsResponse

type UserGroupsResponse struct {
	Groups []UserGroup `json:"groups"`
	Limit  int64       `json:"limit"`
	Offset int64       `json:"offset"`
	Total  int64       `json:"total"`

	// User Model to represent user
	User *User `json:"user,omitempty"`
}

UserGroupsResponse defines model for UserGroupsResponse.

type UserGroupsResponseJSONResponse

type UserGroupsResponseJSONResponse struct {
	Groups []UserGroup `json:"groups"`
	Limit  int64       `json:"limit"`
	Offset int64       `json:"offset"`
	Total  int64       `json:"total"`

	// User Model to represent user
	User *User `json:"user,omitempty"`
}

type UserID

type UserID = string

UserID defines model for UserParam.

type UserResponse

type UserResponse = User

UserResponse Model to represent user

type UserResponseJSONResponse

type UserResponseJSONResponse User

type UsersResponse

type UsersResponse struct {
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
	Total  int64  `json:"total"`
	Users  []User `json:"users"`
}

UsersResponse defines model for UsersResponse.

type UsersResponseJSONResponse

type UsersResponseJSONResponse struct {
	Limit  int64  `json:"limit"`
	Offset int64  `json:"offset"`
	Total  int64  `json:"total"`
	Users  []User `json:"users"`
}

type Validation

type Validation struct {
	Field   *string `json:"field,omitempty"`
	Message *string `json:"message,omitempty"`
}

Validation General structure to show validation errors

type ValidationError

type ValidationError = Notification

ValidationError Generic response for errors and validations

type ValidationErrorJSONResponse

type ValidationErrorJSONResponse Notification

type VerifyAuth200JSONResponse

type VerifyAuth200JSONResponse struct{ VerifyResponseJSONResponse }

func (VerifyAuth200JSONResponse) VisitVerifyAuthResponse

func (response VerifyAuth200JSONResponse) VisitVerifyAuthResponse(w http.ResponseWriter) error

type VerifyAuth401JSONResponse

type VerifyAuth401JSONResponse struct{ InvalidTokenErrorJSONResponse }

func (VerifyAuth401JSONResponse) VisitVerifyAuthResponse

func (response VerifyAuth401JSONResponse) VisitVerifyAuthResponse(w http.ResponseWriter) error

type VerifyAuth500JSONResponse

type VerifyAuth500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (VerifyAuth500JSONResponse) VisitVerifyAuthResponse

func (response VerifyAuth500JSONResponse) VisitVerifyAuthResponse(w http.ResponseWriter) error

type VerifyAuthRequestObject

type VerifyAuthRequestObject struct {
}

type VerifyAuthResponseObject

type VerifyAuthResponseObject interface {
	VisitVerifyAuthResponse(w http.ResponseWriter) error
}

type VerifyResponse

type VerifyResponse = AuthVerify

VerifyResponse defines model for VerifyResponse.

type VerifyResponseJSONResponse

type VerifyResponseJSONResponse AuthVerify

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳