Versions in this module Expand all Collapse all v0 v0.3.0 Nov 21, 2022 Changes in this version type ErrorCode + const InvalidTOTPSecret type SessionCredentials + Complete bool + CreatedAt time.Time + ExpiresAt *time.Time + Id string + Kek []byte + Tek string + TocGroupId string + TocsInGroup int + TocsProvided int + TocsThreshold int + Ttl *int v0.2.0 Sep 20, 2022 v0.1.0 Jul 13, 2022 Changes in this version + func GetSwagger() (swagger *openapi3.T, err error) + func NewCreateSessionRequest(server string, body CreateSessionJSONRequestBody) (*http.Request, error) + func NewCreateSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) + func NewGenerateTotpRequest(server string, id string, body GenerateTotpJSONRequestBody) (*http.Request, error) + func NewGenerateTotpRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) + func NewGetSessionRequest(server string, id string) (*http.Request, error) + func NewPostTocRequest(server string, id string, body PostTocJSONRequestBody) (*http.Request, error) + func NewPostTocRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) + func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) + func RegisterHandlers(router EchoRouter, si ServerInterface) + func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) + type AddToc struct + EncryptedToc string + type Client struct + Client HttpRequestDoer + RequestEditors []RequestEditorFn + Server string + func NewClient(server string, opts ...ClientOption) (*Client, error) + func (c *Client) CreateSession(ctx context.Context, body CreateSessionJSONRequestBody, ...) (*http.Response, error) + func (c *Client) CreateSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + func (c *Client) GenerateTotp(ctx context.Context, id string, body GenerateTotpJSONRequestBody, ...) (*http.Response, error) + func (c *Client) GenerateTotpWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error) + func (c *Client) GetSession(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + func (c *Client) PostToc(ctx context.Context, id string, body PostTocJSONRequestBody, ...) (*http.Response, error) + func (c *Client) PostTocWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error) + type ClientInterface interface + CreateSession func(ctx context.Context, body CreateSessionJSONRequestBody, ...) (*http.Response, error) + CreateSessionWithBody func(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error) + GenerateTotp func(ctx context.Context, id string, body GenerateTotpJSONRequestBody, ...) (*http.Response, error) + GenerateTotpWithBody func(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error) + GetSession func(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + PostToc func(ctx context.Context, id string, body PostTocJSONRequestBody, ...) (*http.Response, error) + PostTocWithBody func(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error) + type ClientOption func(*Client) error + func WithBaseURL(baseURL string) ClientOption + func WithHTTPClient(doer HttpRequestDoer) ClientOption + func WithRequestEditorFn(fn RequestEditorFn) ClientOption + type ClientWithResponses struct + func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) + func (c *ClientWithResponses) CreateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateSessionResponse, error) + func (c *ClientWithResponses) CreateSessionWithResponse(ctx context.Context, body CreateSessionJSONRequestBody, ...) (*CreateSessionResponse, error) + func (c *ClientWithResponses) GenerateTotpWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*GenerateTotpResponse, error) + func (c *ClientWithResponses) GenerateTotpWithResponse(ctx context.Context, id string, body GenerateTotpJSONRequestBody, ...) (*GenerateTotpResponse, error) + func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) + func (c *ClientWithResponses) PostTocWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*PostTocResponse, error) + func (c *ClientWithResponses) PostTocWithResponse(ctx context.Context, id string, body PostTocJSONRequestBody, ...) (*PostTocResponse, error) + type ClientWithResponsesInterface interface + CreateSessionWithBodyWithResponse func(ctx context.Context, contentType string, body io.Reader, ...) (*CreateSessionResponse, error) + CreateSessionWithResponse func(ctx context.Context, body CreateSessionJSONRequestBody, ...) (*CreateSessionResponse, error) + GenerateTotpWithBodyWithResponse func(ctx context.Context, id string, contentType string, body io.Reader, ...) (*GenerateTotpResponse, error) + GenerateTotpWithResponse func(ctx context.Context, id string, body GenerateTotpJSONRequestBody, ...) (*GenerateTotpResponse, error) + GetSessionWithResponse func(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) + PostTocWithBodyWithResponse func(ctx context.Context, id string, contentType string, body io.Reader, ...) (*PostTocResponse, error) + PostTocWithResponse func(ctx context.Context, id string, body PostTocJSONRequestBody, ...) (*PostTocResponse, error) + type CreateSessionJSONBody NewSession + type CreateSessionJSONRequestBody CreateSessionJSONBody + type CreateSessionResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 *SessionCredentials + JSONDefault *Error + func ParseCreateSessionResponse(rsp *http.Response) (*CreateSessionResponse, error) + func (r CreateSessionResponse) Status() string + func (r CreateSessionResponse) StatusCode() int + type DefaultError Error + type EchoRouter interface + CONNECT func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + DELETE func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + GET func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + HEAD func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + OPTIONS func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PATCH func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + POST func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PUT func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + TRACE func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + type Error struct + Code ErrorCode + Message string + type ErrorCode string + const ErrorCodeInvalidTOTPSecret + type GenerateTotpJSONBody SessionKeyEncryptionKey + type GenerateTotpJSONRequestBody GenerateTotpJSONBody + type GenerateTotpResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 *TOTPCode + JSONDefault *Error + func ParseGenerateTotpResponse(rsp *http.Response) (*GenerateTotpResponse, error) + func (r GenerateTotpResponse) Status() string + func (r GenerateTotpResponse) StatusCode() int + type GetSessionResponse struct + Body []byte + HTTPResponse *http.Response + JSON200 *Session + JSONDefault *Error + func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error) + func (r GetSessionResponse) Status() string + func (r GetSessionResponse) StatusCode() int + type HttpRequestDoer interface + Do func(req *http.Request) (*http.Response, error) + type NewSession struct + TocZero Toc + Ttl *int + type PostTocJSONBody AddToc + type PostTocJSONRequestBody PostTocJSONBody + type PostTocResponse struct + Body []byte + HTTPResponse *http.Response + JSONDefault *Error + func ParsePostTocResponse(rsp *http.Response) (*PostTocResponse, error) + func (r PostTocResponse) Status() string + func (r PostTocResponse) StatusCode() int + type RequestEditorFn func(ctx context.Context, req *http.Request) error + type ServerInterface interface + CreateSession func(ctx echo.Context) error + GenerateTotp func(ctx echo.Context, id string) error + GetSession func(ctx echo.Context, id string) error + PostToc func(ctx echo.Context, id string) error + type ServerInterfaceWrapper struct + Handler ServerInterface + func (w *ServerInterfaceWrapper) CreateSession(ctx echo.Context) error + func (w *ServerInterfaceWrapper) GenerateTotp(ctx echo.Context) error + func (w *ServerInterfaceWrapper) GetSession(ctx echo.Context) error + func (w *ServerInterfaceWrapper) PostToc(ctx echo.Context) error + type Session struct + Complete bool + CreatedAt time.Time + ExpiresAt *time.Time + Id string + TocGroupId string + TocsInGroup int + TocsProvided int + TocsThreshold int + Ttl *int + type SessionCredentials struct + type SessionKeyEncryptionKey struct + Kek []byte + type SessionTocEncryptionKey struct + Tek string + type TOTPCode struct + SessionExpiresAt time.Time + Totp string + TotpExpiresAt time.Time + type Toc struct + GroupId string + GroupSize int + GroupThreshold int + Note *string + Share []byte + TocId []byte