types

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string `json:"message"`
}

type APISettings

type APISettings struct {
	DB                 *gorm.DB
	KV                 kv.Store
	TLSCert            string
	TLSKey             string
	Address            string
	APISecret          string
	AccessTokenExpiry  uint
	RefreshTokenExpiry uint
	MaxDaysWoRelogin   int
}

type Credentials

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

type DBInit

type DBInit struct {
	AdminPasswd   string
	SearchPasswd  string
	Users         string
	DefaultPasswd string
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type LoginBody

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

type RefreshToken

type RefreshToken struct {
	Token string `json:"refresh_token"`
}

RefreshToken - TODO comment

type Response

type Response struct {
	TokenType string  `json:"token_type"`
	ExpiresIn float64 `json:"expires_in"`
	ExpiresOn int64   `json:"expires_on"`
	Tokens
}

Response - TODO comment

type Tokens

type Tokens struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

Tokens - TODO comment

Jump to

Keyboard shortcuts

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