types

package
v0.5.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 12, 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                 Store
	TLSCert            string
	TLSKey             string
	Address            string
	APISecret          string
	AccessTokenExpiry  uint
	RefreshTokenExpiry uint
	MaxDaysWoRelogin   int
	Guacamole          bool
}

type Credentials

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

type DBInit

type DBInit struct {
	UseSqlite             bool
	PostgresHost          string
	PostgresPort          int
	PostgresUser          string
	PostgresPassword      string
	PostgresDatabase      string
	PostgresSSLRootCA     string
	PostgresSSLClientCert string
	PostgresSSLClientKey  string
	AdminPasswd           string
	SearchPasswd          string
	Users                 string
	DefaultPasswd         string
}

type ErrorResponse

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

type GuacamoleSupport

type GuacamoleSupport struct {
	Enabled bool `json:"guac_enabled"`
}

type LDAPSettings

type LDAPSettings struct {
	DB          *gorm.DB
	KV          Store
	TLSDisabled bool
	TLSCert     string
	TLSKey      string
	Address     string
	Domain      string
	SizeLimit   int
	Guacamole   bool
}

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 Store

type Store interface {
	// Set a value for a given key
	Set(k string, v string, expiration time.Duration) error
	// Get a value from our key-value store
	Get(k string) (v string, found bool, err error)
	// Delete a key
	Delete(k string) (err error)
	// Close a connection with our key-value store
	Close() error
}

type TokenAuthentication

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

TokenAuthentication - 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