features

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Features = SFeatures{}

Functions

This section is empty.

Types

type ClerkConfig

type ClerkConfig struct {
	PublishableKey string `mapstructure:"CLERK_PUBLISHABLE_KEY"`
	SecretKey      string `mapstructure:"CLERK_SECRET_KEY"`
}

type CorsConfig

type CorsConfig struct {
	AllowOrigins  string `mapstructure:"CORS_ALLOW_ORIGINS"`
	AllowMethods  string `mapstructure:"CORS_ALLOW_METHODS"`
	AllowHeaders  string `mapstructure:"CORS_ALLOW_HEADERS"`
	MaxAge        int    `mapstructure:"CORS_MAX_AGE"`
	AllowCreds    bool   `mapstructure:"CORS_ALLOW_CREDENTIALS"`
	ExposeHeaders string `mapstructure:"CORS_EXPOSE_HEADERS"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Host     string `mapstructure:"DB_HOST"`
	Port     string `mapstructure:"DB_PORT"`
	User     string `mapstructure:"DB_USER"`
	Password string `mapstructure:"DB_PASSWORD"`
	Name     string `mapstructure:"DB_NAME"`
	Timezone string `mapstructure:"DB_TIMEZONE"`
	Platform string `mapstructure:"DB_PLATFORM"`
	SslMode  string `mapstructure:"DB_SSL_MODE"`
}

type Feature

type Feature struct {
	IFeature
	Name string

	Config interface{}
	// contains filtered or unexported fields
}

func (*Feature) AppendFeatureToTable

func (f *Feature) AppendFeatureToTable(t table.Writer)

func (*Feature) CanStart

func (f *Feature) CanStart() bool

func (*Feature) Configure

func (f *Feature) Configure(v reflect.Value)

func (*Feature) GetConfigByName

func (f *Feature) GetConfigByName(name string) string

func (*Feature) GetConfigByNameForPrint

func (f *Feature) GetConfigByNameForPrint(name string) string

func (*Feature) IsConfigured

func (f *Feature) IsConfigured() bool

func (*Feature) IsEnabled

func (f *Feature) IsEnabled() bool

func (*Feature) IsReady

func (f *Feature) IsReady() bool

func (*Feature) PrintFeature

func (f *Feature) PrintFeature()

func (*Feature) ResolveFeatureEnabledState

func (f *Feature) ResolveFeatureEnabledState(v reflect.Value)

func (*Feature) ValidateReadiness

func (f *Feature) ValidateReadiness()

type GzipConfig

type GzipConfig struct {
	Level string `mapstructure:"GZIP_LEVEL"`
}

type IFeature

type IFeature interface {
	IsEnabled() bool
	IsConfigured() bool
	IsReady() bool
	CanStart() bool
	ValidateReadiness()
	Configure(v reflect.Value)
	ResolveFeatureEnabledState(v reflect.Value)
	PrintFeature()
	AppendFeatureToTable(t table.Writer)
}

type KetoConfig

type KetoConfig struct {
	ReadService  string `mapstructure:"KETO_READ_SERVICE"`
	WriteService string `mapstructure:"KETO_WRITE_SERVICE"`
}

type KratosConfig

type KratosConfig struct {
	PublicService string `mapstructure:"KRATOS_PUBLIC_SERVICE"`
	AdminService  string `mapstructure:"KRATOS_ADMIN_SERVICE"`
}

type RedisConfig

type RedisConfig struct {
	Host     string `mapstructure:"REDIS_HOST"`
	Port     string `mapstructure:"REDIS_PORT"`
	Password string `mapstructure:"REDIS_PASSWORD"`
}

type SFeatures

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

func (*SFeatures) Add

func (f *SFeatures) Add(feature *Feature)

func (*SFeatures) GetFeatureByName

func (f *SFeatures) GetFeatureByName(name string) *Feature

func (*SFeatures) GetFeatures

func (f *SFeatures) GetFeatures() []*Feature

func (*SFeatures) Init

func (f *SFeatures) Init(v reflect.Value)

type ServiceConfig

type ServiceConfig struct {
	Host                   string   `mapstructure:"HOST"`
	PrimaryApiPort         string   `mapstructure:"PRIMARY_API_PORT"`
	ProtectedApiPort       string   `mapstructure:"PROTECTED_API_PORT"`
	PublicApiPort          string   `mapstructure:"PUBLIC_API_PORT"`
	HiddenApiPort          string   `mapstructure:"HIDDEN_API_PORT"`
	LogLevel               string   `mapstructure:"LOG_LEVEL"`
	RequestTimeoutDuration string   `mapstructure:"REQUEST_TIMEOUT_DURATION"`
	WatcherSleepInterval   string   `mapstructure:"WATCHER_SLEEP_INTERVAL"`
	DisableFeatures        []string `mapstructure:"DISABLE_FEATURES"`
}

Jump to

Keyboard shortcuts

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