configs

package
v0.0.0-...-fb78454 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseConfigDefaultAppName                        = "jwt-oauth-sso"
	BaseConfigDefaultAppHost                        = "localhost"
	BaseConfigDefaultAppPort                        = 8080
	BaseConfigDefaultAppDebug                       = true
	BaseConfigDefaultTokenIssuerName                = "jwt-oauth-sso"
	BaseConfigDefaultTokenAudienceName              = "user"
	BaseConfigDefaultTokenExpirationResetInDays     = 1
	BaseConfigDefaultTokenExpirationRefreshInDays   = 30
	BaseConfigDefaultTokenExpirationAccessInMinutes = 30
	BaseConfigDefaultTokenSecretKey                 = "secret"
	BaseConfigDefaultDatabaseDsn                    = "file::memory:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig interface {
	GetName() string
	GetHost() string
	GetPort() int
	GetDebug() bool
}

type BaseConfig

type BaseConfig struct {
	// contains filtered or unexported fields
}

func NewBaseConfig

func NewBaseConfig() *BaseConfig

func NewBaseConfigWithYamlFile

func NewBaseConfigWithYamlFile() (*BaseConfig, error)

func (BaseConfig) GetAudienceName

func (receiver BaseConfig) GetAudienceName() string

func (BaseConfig) GetDebug

func (receiver BaseConfig) GetDebug() bool

func (BaseConfig) GetDsn

func (receiver BaseConfig) GetDsn() string

func (BaseConfig) GetExpirationAccessInMinutes

func (receiver BaseConfig) GetExpirationAccessInMinutes() int

func (BaseConfig) GetExpirationRefreshInDays

func (receiver BaseConfig) GetExpirationRefreshInDays() int

func (BaseConfig) GetExpirationResetInDays

func (receiver BaseConfig) GetExpirationResetInDays() int

func (BaseConfig) GetHost

func (receiver BaseConfig) GetHost() string

func (BaseConfig) GetIssuerName

func (receiver BaseConfig) GetIssuerName() string

func (BaseConfig) GetName

func (receiver BaseConfig) GetName() string

func (BaseConfig) GetPort

func (receiver BaseConfig) GetPort() int

func (BaseConfig) GetSecretKey

func (receiver BaseConfig) GetSecretKey() string

type Config

type Config interface {
	AppConfig
	TokenConfig
	DatabaseConfig
}

type DatabaseConfig

type DatabaseConfig interface {
	GetDsn() string
}

type TokenConfig

type TokenConfig interface {
	GetIssuerName() string
	GetAudienceName() string
	GetExpirationResetInDays() int
	GetExpirationRefreshInDays() int
	GetExpirationAccessInMinutes() int
	GetSecretKey() string
}

Jump to

Keyboard shortcuts

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