Versions in this module Expand all Collapse all v1 v1.2.0 May 15, 2024 Changes in this version + const Prefix + func WithServerURL(ctx context.Context, u *url.URL) context.Context + type Client struct + func NewClient(serverURL string, opts ...ClientOption) (*Client, error) + func (c *Client) CreateToken(ctx context.Context, request *Config) (*Credential, error) + func (c *Client) DeleteToken(ctx context.Context, params DeleteTokenParams) error + func (c *Client) GetToken(ctx context.Context, params GetTokenParams) (*Token, error) + func (c *Client) ListTokens(ctx context.Context) ([]Token, error) + func (c *Client) RefreshToken(ctx context.Context, params RefreshTokenParams) (*Credential, error) + func (c *Client) UpdateToken(ctx context.Context, request *Config, params UpdateTokenParams) error + type ClientOption interface + func WithClient(client ht.Client) ClientOption + type Config struct + Headers []NameValue + Host OptString + Label OptString + Path OptString + func (s *Config) Decode(d *jx.Decoder) error + func (s *Config) Encode(e *jx.Encoder) + func (s *Config) GetHeaders() []NameValue + func (s *Config) GetHost() OptString + func (s *Config) GetLabel() OptString + func (s *Config) GetPath() OptString + func (s *Config) MarshalJSON() ([]byte, error) + func (s *Config) SetHeaders(val []NameValue) + func (s *Config) SetHost(val OptString) + func (s *Config) SetLabel(val OptString) + func (s *Config) SetPath(val OptString) + func (s *Config) UnmarshalJSON(data []byte) error + func (s *Config) Validate() error + type Credential struct + ID int + Key string + func (s *Credential) Decode(d *jx.Decoder) error + func (s *Credential) Encode(e *jx.Encoder) + func (s *Credential) GetID() int + func (s *Credential) GetKey() string + func (s *Credential) MarshalJSON() ([]byte, error) + func (s *Credential) SetID(val int) + func (s *Credential) SetKey(val string) + func (s *Credential) UnmarshalJSON(data []byte) error + type DeleteTokenNoContent struct + type DeleteTokenParams struct + Token int + type ErrorHandler = ogenerrors.ErrorHandler + type GetTokenParams struct + Token int + type Handler interface + CreateToken func(ctx context.Context, req *Config) (*Credential, error) + DeleteToken func(ctx context.Context, params DeleteTokenParams) error + GetToken func(ctx context.Context, params GetTokenParams) (*Token, error) + ListTokens func(ctx context.Context) ([]Token, error) + RefreshToken func(ctx context.Context, params RefreshTokenParams) (*Credential, error) + UpdateToken func(ctx context.Context, req *Config, params UpdateTokenParams) error + type Invoker interface + CreateToken func(ctx context.Context, request *Config) (*Credential, error) + DeleteToken func(ctx context.Context, params DeleteTokenParams) error + GetToken func(ctx context.Context, params GetTokenParams) (*Token, error) + ListTokens func(ctx context.Context) ([]Token, error) + RefreshToken func(ctx context.Context, params RefreshTokenParams) (*Credential, error) + UpdateToken func(ctx context.Context, request *Config, params UpdateTokenParams) error + type Middleware = middleware.Middleware + type NameValue struct + Name string + Value string + func (s *NameValue) Decode(d *jx.Decoder) error + func (s *NameValue) Encode(e *jx.Encoder) + func (s *NameValue) GetName() string + func (s *NameValue) GetValue() string + func (s *NameValue) MarshalJSON() ([]byte, error) + func (s *NameValue) SetName(val string) + func (s *NameValue) SetValue(val string) + func (s *NameValue) UnmarshalJSON(data []byte) error + func (s *NameValue) Validate() error + type OptDateTime struct + Set bool + Value time.Time + func NewOptDateTime(v time.Time) OptDateTime + func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error + func (o *OptDateTime) Reset() + func (o *OptDateTime) SetTo(v time.Time) + func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time)) + func (o OptDateTime) Get() (v time.Time, ok bool) + func (o OptDateTime) IsSet() bool + func (o OptDateTime) Or(d time.Time) time.Time + func (s *OptDateTime) UnmarshalJSON(data []byte) error + func (s OptDateTime) MarshalJSON() ([]byte, error) + type OptString struct + Set bool + Value string + func NewOptString(v string) OptString + func (o *OptString) Decode(d *jx.Decoder) error + func (o *OptString) Reset() + func (o *OptString) SetTo(v string) + func (o OptString) Encode(e *jx.Encoder) + func (o OptString) Get() (v string, ok bool) + func (o OptString) IsSet() bool + func (o OptString) Or(d string) string + func (s *OptString) UnmarshalJSON(data []byte) error + func (s OptString) MarshalJSON() ([]byte, error) + type Option interface + type RefreshTokenParams struct + Token int + type Route struct + func (r Route) Args() []string + func (r Route) Name() string + func (r Route) OperationID() string + func (r Route) PathPattern() string + func (r Route) Summary() string + type Server struct + func NewServer(h Handler, opts ...ServerOption) (*Server, error) + func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) + func (s *Server) FindRoute(method, path string) (Route, bool) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerOption interface + func WithErrorHandler(h ErrorHandler) ServerOption + func WithMaxMultipartMemory(max int64) ServerOption + func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption + func WithMiddleware(m ...Middleware) ServerOption + func WithNotFound(notFound http.HandlerFunc) ServerOption + func WithPathPrefix(prefix string) ServerOption + type Token struct + CreatedAt time.Time + Headers []NameValue + Host string + ID int + KeyID string + Label string + LastAccessAt OptDateTime + Path string + Requests int64 + UpdatedAt time.Time + User string + func (s *Token) Decode(d *jx.Decoder) error + func (s *Token) Encode(e *jx.Encoder) + func (s *Token) GetCreatedAt() time.Time + func (s *Token) GetHeaders() []NameValue + func (s *Token) GetHost() string + func (s *Token) GetID() int + func (s *Token) GetKeyID() string + func (s *Token) GetLabel() string + func (s *Token) GetLastAccessAt() OptDateTime + func (s *Token) GetPath() string + func (s *Token) GetRequests() int64 + func (s *Token) GetUpdatedAt() time.Time + func (s *Token) GetUser() string + func (s *Token) MarshalJSON() ([]byte, error) + func (s *Token) SetCreatedAt(val time.Time) + func (s *Token) SetHeaders(val []NameValue) + func (s *Token) SetHost(val string) + func (s *Token) SetID(val int) + func (s *Token) SetKeyID(val string) + func (s *Token) SetLabel(val string) + func (s *Token) SetLastAccessAt(val OptDateTime) + func (s *Token) SetPath(val string) + func (s *Token) SetRequests(val int64) + func (s *Token) SetUpdatedAt(val time.Time) + func (s *Token) SetUser(val string) + func (s *Token) UnmarshalJSON(data []byte) error + func (s *Token) Validate() error + type UpdateTokenNoContent struct + type UpdateTokenParams struct + Token int