jsonconfig

package
v1.0.84 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Name      string   `json:"name"`
	Protocolo string   `json:"protocolo"`
	Host      string   `json:"host"`
	Port      int      `json:"port"`
	Gateway   Gateway  `json:"gateway"`
	Schemas   []Schema `json:"schemas"`
	Ativo     bool     `json:"ativo"`
}

func (*Api) GetGateway

func (a *Api) GetGateway() *Gateway

func (*Api) GetSchemaByName

func (a *Api) GetSchemaByName(name string) *Schema

func (*Api) GetSchemas

func (a *Api) GetSchemas() []Schema

type Boot

type Boot struct {
	Name    string   `json:"name"`
	Schemas []Schema `json:"schemas"`
	Ativo   bool     `json:"ativo"`
}

func NewBoot

func NewBoot() *Boot

func (*Boot) GetSchemaByHost

func (b *Boot) GetSchemaByHost(host string) *Schema

func (*Boot) GetSchemaByName

func (b *Boot) GetSchemaByName(name string) *Schema

func (*Boot) GetSchemaByPort

func (b *Boot) GetSchemaByPort(port int) *Schema

func (*Boot) GetSchemaBySID

func (b *Boot) GetSchemaBySID(sid string) *Schema

func (*Boot) GetSchemaByUser

func (b *Boot) GetSchemaByUser(user string) *Schema

func (*Boot) GetSchemas

func (b *Boot) GetSchemas() []Schema

type Config

type Config struct {
	Boots []Boot `json:"boots"`
	Apis  []Api  `json:"apis"`
	Path  string `json:"path"`
}

func (*Config) GetApiByName

func (c *Config) GetApiByName(name string) *Api

func (*Config) GetApis

func (c *Config) GetApis() []Api

func (*Config) GetBootByName

func (c *Config) GetBootByName(name string) *Boot

func (*Config) GetBoots

func (c *Config) GetBoots() []Boot

func (*Config) GetPath

func (c *Config) GetPath() string

type Gateway

type Gateway struct {
	Protocolo string `json:"protocolo"`
	Host      string `json:"host"`
	Port      int    `json:"port"`
	Ativo     bool   `json:"ativo"`
}

func NewGateway

func NewGateway() *Gateway

type JsonConfig

type JsonConfig struct {
	Name string
	// contains filtered or unexported fields
}

func NewJsonConfig

func NewJsonConfig() *JsonConfig

func NewJsonConfigGlobal

func NewJsonConfigGlobal() *JsonConfig

func (*JsonConfig) GetConfig

func (j *JsonConfig) GetConfig() *Config

func (*JsonConfig) Load

func (j *JsonConfig) Load() error

type Schema

type Schema struct {
	Host   string `json:"host"`
	Port   int    `json:"port"`
	User   string `json:"user"`
	Pass   string `json:"pass"`
	Schema string `json:"schema"`
	SID    string `json:"sid"`
	Ativo  bool   `json:"ativo"`
}

func NewSchema

func NewSchema() *Schema

Jump to

Keyboard shortcuts

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