config

package
v0.0.0-...-a773fcb Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config config stcut

func (*Config) Database

func (config *Config) Database() DatabaseConfigInterface

Database get persistence config

func (*Config) Redis

func (config *Config) Redis() RedisConfiginterface

Redis get redis config

func (*Config) Server

func (config *Config) Server() ServerConfigInterface

Server get server config

func (*Config) Swagger

func (config *Config) Swagger() *Swagger

Swagger get swagger config

type Database

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

Database persistence config struct

func NewDatabaseConfig

func NewDatabaseConfig() *Database

NewDatabaseConfig create persistence instance

func (*Database) Host

func (database *Database) Host() string

Host get persistence host

func (*Database) Name

func (database *Database) Name() string

Name get persistence name

func (*Database) Password

func (database *Database) Password() string

Password get persistence user password

func (*Database) Port

func (database *Database) Port() string

Port get persistence port number

func (*Database) User

func (database *Database) User() string

User get databsae user name

type DatabaseConfigInterface

type DatabaseConfigInterface interface {
	Host() string
	Port() string
	Name() string
	User() string
	Password() string
}

DatabaseConfigInterface persistence config interface

type Interface

type Interface interface {
	Swagger() *Swagger
	Server() ServerConfigInterface
	Database() DatabaseConfigInterface
	Redis() RedisConfiginterface
}

Interface config interface

func Initialize

func Initialize() Interface

Initialize initialize config

type Redis

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

Redis redis struct

func NewRedisConfig

func NewRedisConfig() *Redis

NewRedisConfig create redis instance

func (*Redis) Address

func (redis *Redis) Address() string

Address get redis address

func (*Redis) Password

func (redis *Redis) Password() string

Password get redis password

type RedisConfiginterface

type RedisConfiginterface interface {
	Address() string
	Password() string
}

RedisConfiginterface redis config interface

type Server

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

Server server config struct

func NewServerConfig

func NewServerConfig() *Server

NewServerConfig create server config struct instance

func (*Server) Mode

func (server *Server) Mode() string

Mode get server mode

func (*Server) Port

func (server *Server) Port() string

Port get server port number

type ServerConfigInterface

type ServerConfigInterface interface {
	Port() string
	Mode() string
}

ServerConfigInterface server config interface

type Swagger

type Swagger struct{}

Swagger swagger config struct

func NewSwagger

func NewSwagger() *Swagger

NewSwagger create swagger configuration instance

Jump to

Keyboard shortcuts

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