baseconfig

package
v0.0.0-...-e3601d1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MulanPSL-2.0 Imports: 11 Imported by: 20

Documentation

Index

Constants

View Source
const SEVICE_NAME_NONE = "web.none.com"

@Title 文件名称: gateway_dto.go @Description 描述: GatewayDto配置信息

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

Variables

This section is empty.

Functions

func InjectDbClientDto

func InjectDbClientDto(s *DbClientDto)

func InjectElasticClientDto

func InjectElasticClientDto(s *ElasticClientDto)

func InjectGatewayDto

func InjectGatewayDto(s *GatewayDto)

func InjectGormClientDto

func InjectGormClientDto(s *GormClientDto)

func InjectNatsClientDto

func InjectNatsClientDto(s *NatsClientDto)

func InjectRedisClientDto

func InjectRedisClientDto(s *RedisClientDto)

func InjectRpcServerDto

func InjectRpcServerDto(s *RpcServerDto)

func InjectSoftwareDto

func InjectSoftwareDto(s *SoftwareDto)

func InjectSwaggerClientDto

func InjectSwaggerClientDto(s *SwaggerClientDto)

func InjectWebClientDto

func InjectWebClientDto(s *WebClientDto)

func InjectWebServerDto

func InjectWebServerDto(s *WebServerDto)

func LoadDbClientDto

func LoadDbClientDto() baseiface.ISingleton

func LoadElasticClientDto

func LoadElasticClientDto() baseiface.ISingleton

func LoadFactroyClientDto

func LoadFactroyClientDto() baseiface.ISingleton

func LoadGatewayDto

func LoadGatewayDto() baseiface.ISingleton

func LoadGocenterDto

func LoadGocenterDto() baseiface.ISingleton

func LoadGormClientDto

func LoadGormClientDto() baseiface.ISingleton

func LoadNatsClientDto

func LoadNatsClientDto() baseiface.ISingleton

func LoadRedisClientDto

func LoadRedisClientDto() baseiface.ISingleton

func LoadRpcServerDto

func LoadRpcServerDto() baseiface.ISingleton

func LoadSoftwareDto

func LoadSoftwareDto() baseiface.ISingleton

func LoadSwaggerClientDto

func LoadSwaggerClientDto() baseiface.ISingleton

func LoadWebClientDto

func LoadWebClientDto() baseiface.ISingleton

func LoadWebServerDto

func LoadWebServerDto() baseiface.ISingleton

Types

type BypassDto

type BypassDto struct {
	Path string `json:"path"`
}

type DbClientDto

type DbClientDto struct {
	configdto.IchubClientDto `json:"-"`

	Dbtype string `json:"dbtype"`
	Dbname string `json:"dbname"`
	Host   string `json:"host"`
	Port   string `json:"port"`

	Username string `json:"username"`
	Password string `json:"password"`
	Sslmode  string `json:"sslmode"`
	Charset  string `json:"charset"`

	GormClient *GormClientDto `json:"gorm_client"`
}

func FindBeanDbClientDto

func FindBeanDbClientDto() *DbClientDto

func NewDbClientDto

func NewDbClientDto() *DbClientDto

func (*DbClientDto) CacheKey

func (this *DbClientDto) CacheKey() string

func (*DbClientDto) IfCockdb

func (this *DbClientDto) IfCockdb() bool

func (*DbClientDto) IfMysql

func (this *DbClientDto) IfMysql() bool

func (*DbClientDto) IfPostgres

func (this *DbClientDto) IfPostgres() bool

func (*DbClientDto) IsMysql

func (this *DbClientDto) IsMysql() bool

func (*DbClientDto) MakeCockroachUrl

func (this *DbClientDto) MakeCockroachUrl() string

func (*DbClientDto) MakeMysqlUrl

func (this *DbClientDto) MakeMysqlUrl() string

func (*DbClientDto) MakePostgresUrl

func (this *DbClientDto) MakePostgresUrl() string

type ElasticClientDto

type ElasticClientDto struct {
	configdto.IchubClientDto
	URL string `json:"url"` //("http://192.168.4.111:9200,"),
	// 设置基于http configdto auth验证的账号和密码
	//elastic.SetBasicAuth("elastic", "123456"),
	Username string `json:"username"`
	Password string `json:"password"`
	// 启用gzip压缩
	Gzip bool `json:"gzip"`
}

func FindBeanElasticClientDto

func FindBeanElasticClientDto() *ElasticClientDto

func NewElasticClientDto

func NewElasticClientDto() *ElasticClientDto

func (*ElasticClientDto) Parse

func (this *ElasticClientDto) Parse() *ElasticClientDto

type FactroyClientDto

type FactroyClientDto struct {
	basedto.BaseEntitySingle

	Author string

	PkgNow    string
	PkgNew    string
	PkgApp    string
	PkgAppNew string

	Time2Int  string
	JsonCamel bool
}

func FindBeanFactroyClientDto

func FindBeanFactroyClientDto() *FactroyClientDto

func NewFactroyClientDto

func NewFactroyClientDto() *FactroyClientDto

type GatewayDto

type GatewayDto struct {
	ByPass []BypassDto `json:"by_pass"`
	Routes []RouteDto  `json:"routes"`

	//- path: /datadict
	//serviceId: web.platform.com
	MapPath2Service map[string]string `json:"map_path_2_service,omitempty"`

	configdto.IchubClientDto `json:"-"`
}

func FindBeanGatewayDto

func FindBeanGatewayDto() *GatewayDto

func NewGatewayDto

func NewGatewayDto() *GatewayDto

func (*GatewayDto) Bypass

func (this *GatewayDto) Bypass(path string) bool

func (*GatewayDto) FindServiceName

func (this *GatewayDto) FindServiceName(path string) string

func (*GatewayDto) ToMap

func (this *GatewayDto) ToMap() *GatewayDto

- path: /datadict serviceId: web.platform.com

type GocenterDto

type GocenterDto struct {
	basedto.BaseEntity
	Centertype string
	Hosturl    string
}

func FindBeanGocenterDto

func FindBeanGocenterDto() *GocenterDto

func NewGocenterDto

func NewGocenterDto() *GocenterDto

type GormClientDto

type GormClientDto struct {
	configdto.IchubClientDto `json:"-"`

	Debug  string `json:"debug"`
	DbType string `json:"db_type"`
	Enable string `json:"enabled"`

	MaxLifetime  string         `json:"max_lifetime"`
	MaxOpenConns string         `json:"max_open_conns"`
	MaxIdleConns string         `json:"max_idle_conns"`
	Datasource   []*DbClientDto `json:"datasource"`
}

func FindBeanGormClientDto

func FindBeanGormClientDto() *GormClientDto

func NewGormClientDto

func NewGormClientDto() *GormClientDto

func (*GormClientDto) ExistDatasource

func (self *GormClientDto) ExistDatasource() bool
func (this *GormClientDto) Parse() *GormClientDto {
	//this.Debug = this.ParseValue("Debug", this.Debug)
	//this.DbType = this.ParseValue("DbType", this.DbType)
	//this.Enable = this.ParseValue("Enabled", this.Enable)
	//
	//this.MaxLifetime = this.ParseValue("MaxLifetime", this.MaxLifetime)
	//this.MaxOpenConns = this.ParseValue("MaxOpenConns", this.MaxOpenConns)
	//this.MaxIdleConns = this.ParseValue("MaxIdleConns", this.MaxIdleConns)

	this.IchubClientDto.Parse()
	return this
}

type NatsClientDto

type NatsClientDto struct {
	configdto.IchubClientDto

	Url       string `json:"url"`
	Timeout   string `json:"timeout"`
	Subscribe struct {
		TopicSync  string
		TopicAsync string
	}
}

func FindBeanNatsClientDto

func FindBeanNatsClientDto() *NatsClientDto

func NewNatsClientDto

func NewNatsClientDto() *NatsClientDto

type RedisClientDto

type RedisClientDto struct {
	configdto.IchubClientDto

	Addr     string `json:"addr"`     //  "192.168.14.58:6379",
	Password string `json:"password"` // "KiZ9dJBSk1cju",
	DB       int    `json:"DB"`
}

func FindBeanRedisClientDto

func FindBeanRedisClientDto() *RedisClientDto

func NewRedisClientDto

func NewRedisClientDto() *RedisClientDto

func (*RedisClientDto) Parse

func (this *RedisClientDto) Parse() *RedisClientDto

type RouteDto

type RouteDto struct {
	ServiceId string `json:"service_id"`
	Path      string `json:"path"`
}

- path: /datadict serviceId: web.platform.com

type RpcServerDto

type RpcServerDto struct {
	configdto.IchubClientDto
	EtcdHost   string `json:"etcd_host"`
	ServerName string `json:"server_name"`
	ClientName string `json:"-"`
	ServerPort int    `json:"server_port"`
}

@Title 文件名称: rpc_server_dto.go @Description 描述: Rpc服务配置信息

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

func FindBeanRpcServerDto

func FindBeanRpcServerDto() *RpcServerDto

func NewRpcServerDto

func NewRpcServerDto() *RpcServerDto

func (*RpcServerDto) Parse

func (this *RpcServerDto) Parse() *RpcServerDto

type SoftwareDto

type SoftwareDto struct {
	configdto.IchubClientDto
	Env       string
	WebPrefix string
	Author    string
	Corp      string
	Salt      string
	Version   string
	Name      string
}

func FindBeanSoftwareDto

func FindBeanSoftwareDto() *SoftwareDto

func NewSoftwareDto

func NewSoftwareDto() *SoftwareDto

type SwaggerClientDto

type SwaggerClientDto struct {
	configdto.IchubClientDto `json:"-"`
	Host                     string `json:"host"`
	BasePath                 string `json:"base_path"`
	Version                  string `json:"version"`
	Title                    string `json:"title"`
	Enable                   string `json:"enable"`
}

func FindBeanSwaggerClientDto

func FindBeanSwaggerClientDto() *SwaggerClientDto

func NewSwaggerClientDto

func NewSwaggerClientDto() *SwaggerClientDto

type WebClientDto

type WebClientDto struct {
	configdto.IchubClientDto

	EtcdHost   string `json:"etcd_host"`
	ServerName string `json:"server_name"`
	TestUrl    string `json:"test_url"`

	WebTimeout string `json:"web_timeout"`
}

@Title 文件名称: web_server_dto.go @Description 描述: Web服务配置信息

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

func FindBeanWebClientDto

func FindBeanWebClientDto() *WebClientDto

func NewWebClientDto

func NewWebClientDto() *WebClientDto

func (*WebClientDto) Parse

func (this *WebClientDto) Parse() *WebClientDto

type WebServerDto

type WebServerDto struct {
	EtcdHost   string `json:"etcd_host"`
	ServerName string `json:"server_name"`
	ServerPort int    `json:"server_port"`

	ServerIp string `json:"server_ip,omitempty"`
	configdto.IchubClientDto
}

@Title 文件名称: web_server_dto.go @Description 描述: Web服务配置信息

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

func FindBeanWebServerDto

func FindBeanWebServerDto() *WebServerDto

func NewWebServerDto

func NewWebServerDto() *WebServerDto

func (*WebServerDto) Parse

func (this *WebServerDto) Parse() *WebServerDto

func (*WebServerDto) String

func (this *WebServerDto) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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