contract

package
v0.0.0-...-f4de95a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterContract

type AdapterContract struct {
}

type AppContract

type AppContract struct {
	Config          *Config
	Services        ServiceContract
	Repositories    RepositoryContract
	Adapters        AdapterContract
	Log             nlogger.Logger
	ResponseHandler vhttp.ResponseHandler
}

type Config

type Config struct {
	Debug                   string  `envconfig:"DEBUG"`
	Port                    int     `envconfig:"PORT"`
	Stage                   string  `envconfig:"STAGE"`
	ServerSecure            bool    `envconfig:"SERVER_LISTEN_SECURE"`
	ServerCert              string  `envconfig:"SERVER_CERT_PATH"`
	ServerCertKey           string  `envconfig:"SERVER_CERT_PATH_KEY"`
	ServerTrustProxy        string  `envconfig:"SERVER_TRUST_PROXY"`
	ServerBaseURL           url.URL `envconfig:"SERVER_HTTP_BASE_URL"`
	CORS                    string  `envconfig:"CORS"`
	DatabaseDriver          string  `envconfig:"DB_DRIVER"`
	DatabaseHost            string  `envconfig:"DB_HOST"`
	DatabasePort            string  `envconfig:"DB_PORT"`
	DatabaseUsername        string  `envconfig:"DB_USER"`
	DatabasePassword        string  `envconfig:"DB_PASS"`
	DatabaseName            string  `envconfig:"DB_NAME"`
	DatabaseMaxIdleConn     string  `envconfig:"DB_POOL_MAX_IDLE_CONN"`
	DatabaseMaxOpenConn     string  `envconfig:"DB_POOL_MAX_OPEN_CONN"`
	DatabaseMaxConnLifetime string  `envconfig:"DB_POOL_MAX_CONN_LIFETIME"`
	DatabaseBootMigration   string  `envconfig:"DB_BOOT_MIGRATION"`
	JWTKey                  string  `envconfig:"JWT_KEY"`
	JWTExpiry               int     `envconfig:"JWT_EXPIRY"`
}

func (*Config) GetHTTPBaseURL

func (c *Config) GetHTTPBaseURL() string

type RepositoryContract

type RepositoryContract struct {
}

type RepositoryInitializer

type RepositoryInitializer interface {
	Init(adapters *AdapterContract) error
}

type ServiceContract

type ServiceContract struct {
}

type ServiceInitializer

type ServiceInitializer interface {
	Init(app *AppContract) error
}

Jump to

Keyboard shortcuts

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