member

package
v0.0.0-...-588ec63 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 PathToRawSpec

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

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

Types

type ChiServerOptions

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

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 LoginMemberJSONRequestBody

type LoginMemberJSONRequestBody = externalRef2.LoginRequest

LoginMemberJSONRequestBody defines body for LoginMember for application/json ContentType.

type LogoutMemberJSONRequestBody

type LogoutMemberJSONRequestBody = externalRef2.LogoutRequest

LogoutMemberJSONRequestBody defines body for LogoutMember for application/json ContentType.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RegisterMemberJSONRequestBody

type RegisterMemberJSONRequestBody = externalRef2.MemberCreateRequest

RegisterMemberJSONRequestBody defines body for RegisterMember for application/json ContentType.

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 ServerInterface

type ServerInterface interface {
	// Get all members
	// (GET /member)
	GetAllMembers(w http.ResponseWriter, r *http.Request)
	// Create a new member
	// (POST /member)
	RegisterMember(w http.ResponseWriter, r *http.Request)
	// Log in a member
	// (POST /member/login)
	LoginMember(w http.ResponseWriter, r *http.Request)
	// Log out a member
	// (POST /member/logout)
	LogoutMember(w http.ResponseWriter, r *http.Request)
	// Delete a member by ID
	// (DELETE /member/{member_id})
	DeleteMemberByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Get a member by ID
	// (GET /member/{member_id})
	GetMemberByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Update a member by ID
	// (PUT /member/{member_id})
	UpdateMemberByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Delete a member's credentials by ID
	// (DELETE /member/{member_id}/Credentials)
	DeleteMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Get a member's credentials by ID
	// (GET /member/{member_id}/Credentials)
	GetMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Update a member's credentials by ID
	// (PUT /member/{member_id}/Credentials)
	UpdateMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)
	// Get all project IDs for a member
	// (GET /member/{member_id}/project-ids)
	GetAllMemberProjectIDs(w http.ResponseWriter, r *http.Request, memberId int)
	// Get all projects for a member
	// (GET /member/{member_id}/projects)
	GetAllMemberProjects(w http.ResponseWriter, r *http.Request, memberId int)
}

ServerInterface represents all server handlers.

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

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

DeleteMemberByID operation middleware

func (*ServerInterfaceWrapper) DeleteMemberCredentialsByID

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

DeleteMemberCredentialsByID operation middleware

func (*ServerInterfaceWrapper) GetAllMemberProjectIDs

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

GetAllMemberProjectIDs operation middleware

func (*ServerInterfaceWrapper) GetAllMemberProjects

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

GetAllMemberProjects operation middleware

func (*ServerInterfaceWrapper) GetAllMembers

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

GetAllMembers operation middleware

func (*ServerInterfaceWrapper) GetMemberByID

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

GetMemberByID operation middleware

func (*ServerInterfaceWrapper) GetMemberCredentialsByID

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

GetMemberCredentialsByID operation middleware

func (*ServerInterfaceWrapper) LoginMember

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

LoginMember operation middleware

func (*ServerInterfaceWrapper) LogoutMember

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

LogoutMember operation middleware

func (*ServerInterfaceWrapper) RegisterMember

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

RegisterMember operation middleware

func (*ServerInterfaceWrapper) UpdateMemberByID

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

UpdateMemberByID operation middleware

func (*ServerInterfaceWrapper) UpdateMemberCredentialsByID

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

UpdateMemberCredentialsByID operation middleware

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

func (_ Unimplemented) DeleteMemberByID(w http.ResponseWriter, r *http.Request, memberId int)

Delete a member by ID (DELETE /member/{member_id})

func (Unimplemented) DeleteMemberCredentialsByID

func (_ Unimplemented) DeleteMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)

Delete a member's credentials by ID (DELETE /member/{member_id}/Credentials)

func (Unimplemented) GetAllMemberProjectIDs

func (_ Unimplemented) GetAllMemberProjectIDs(w http.ResponseWriter, r *http.Request, memberId int)

Get all project IDs for a member (GET /member/{member_id}/project-ids)

func (Unimplemented) GetAllMemberProjects

func (_ Unimplemented) GetAllMemberProjects(w http.ResponseWriter, r *http.Request, memberId int)

Get all projects for a member (GET /member/{member_id}/projects)

func (Unimplemented) GetAllMembers

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

Get all members (GET /member)

func (Unimplemented) GetMemberByID

func (_ Unimplemented) GetMemberByID(w http.ResponseWriter, r *http.Request, memberId int)

Get a member by ID (GET /member/{member_id})

func (Unimplemented) GetMemberCredentialsByID

func (_ Unimplemented) GetMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)

Get a member's credentials by ID (GET /member/{member_id}/Credentials)

func (Unimplemented) LoginMember

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

Log in a member (POST /member/login)

func (Unimplemented) LogoutMember

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

Log out a member (POST /member/logout)

func (Unimplemented) RegisterMember

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

Create a new member (POST /member)

func (Unimplemented) UpdateMemberByID

func (_ Unimplemented) UpdateMemberByID(w http.ResponseWriter, r *http.Request, memberId int)

Update a member by ID (PUT /member/{member_id})

func (Unimplemented) UpdateMemberCredentialsByID

func (_ Unimplemented) UpdateMemberCredentialsByID(w http.ResponseWriter, r *http.Request, memberId int)

Update a member's credentials by ID (PUT /member/{member_id}/Credentials)

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 UpdateMemberByIDJSONRequestBody

type UpdateMemberByIDJSONRequestBody = externalRef2.MemberUpdateRequest

UpdateMemberByIDJSONRequestBody defines body for UpdateMemberByID for application/json ContentType.

type UpdateMemberCredentialsByIDJSONRequestBody

type UpdateMemberCredentialsByIDJSONRequestBody = externalRef2.MemberCredentialsUpdateRequest

UpdateMemberCredentialsByIDJSONRequestBody defines body for UpdateMemberCredentialsByID for application/json ContentType.

Jump to

Keyboard shortcuts

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