conf

package
v0.0.0-...-d296433 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyType_name = map[int32]string{
		0: "RSA",
		1: "ECDSA",
	}
	KeyType_value = map[string]int32{
		"RSA":   0,
		"ECDSA": 1,
	}
)

Enum value maps for KeyType.

View Source
var File_conf_conf_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	Server *Server   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	Data   *Data     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Root   *RootCert `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"`
	Log    *Log      `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty"`
	// contains filtered or unexported fields
}

func (*Bootstrap) Descriptor deprecated

func (*Bootstrap) Descriptor() ([]byte, []int)

Deprecated: Use Bootstrap.ProtoReflect.Descriptor instead.

func (*Bootstrap) GetData

func (x *Bootstrap) GetData() *Data

func (*Bootstrap) GetLog

func (x *Bootstrap) GetLog() *Log

func (*Bootstrap) GetRoot

func (x *Bootstrap) GetRoot() *RootCert

func (*Bootstrap) GetServer

func (x *Bootstrap) GetServer() *Server

func (*Bootstrap) ProtoMessage

func (*Bootstrap) ProtoMessage()

func (*Bootstrap) ProtoReflect

func (x *Bootstrap) ProtoReflect() protoreflect.Message

func (*Bootstrap) Reset

func (x *Bootstrap) Reset()

func (*Bootstrap) String

func (x *Bootstrap) String() string

type Data

type Data struct {
	Database *Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Redis    *Redis    `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

func (*Data) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetDatabase

func (x *Data) GetDatabase() *Database

func (*Data) GetRedis

func (x *Data) GetRedis() *Redis

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type Database

type Database struct {

	// 数据库类型:mysql、sqlite3、postgres
	Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// 最大空闲连接数
	MaxIdleConn int64 `protobuf:"varint,3,opt,name=max_idle_conn,json=maxIdleConn,proto3" json:"max_idle_conn,omitempty"`
	// 最大连接数
	MaxOpenConn int64 `protobuf:"varint,4,opt,name=max_open_conn,json=maxOpenConn,proto3" json:"max_open_conn,omitempty"`
	// 连接空闲超时参数
	ConnMaxLifetime *durationpb.Duration `protobuf:"bytes,5,opt,name=conn_max_lifetime,json=connMaxLifetime,proto3" json:"conn_max_lifetime,omitempty"`
	// contains filtered or unexported fields
}

func (*Database) Descriptor deprecated

func (*Database) Descriptor() ([]byte, []int)

Deprecated: Use Database.ProtoReflect.Descriptor instead.

func (*Database) GetConnMaxLifetime

func (x *Database) GetConnMaxLifetime() *durationpb.Duration

func (*Database) GetDriver

func (x *Database) GetDriver() string

func (*Database) GetMaxIdleConn

func (x *Database) GetMaxIdleConn() int64

func (*Database) GetMaxOpenConn

func (x *Database) GetMaxOpenConn() int64

func (*Database) GetSource

func (x *Database) GetSource() string

func (*Database) ProtoMessage

func (*Database) ProtoMessage()

func (*Database) ProtoReflect

func (x *Database) ProtoReflect() protoreflect.Message

func (*Database) Reset

func (x *Database) Reset()

func (*Database) String

func (x *Database) String() string

type KeyPair

type KeyPair struct {
	KeyType  KeyType `protobuf:"varint,1,opt,name=key_type,json=keyType,proto3,enum=kratos.api.KeyType" json:"key_type,omitempty"`
	KeySize  int32   `protobuf:"varint,2,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"`
	Password string  `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Common   string  `protobuf:"bytes,4,opt,name=common,proto3" json:"common,omitempty"`
	// contains filtered or unexported fields
}

生成公私钥请求

func (*KeyPair) Descriptor deprecated

func (*KeyPair) Descriptor() ([]byte, []int)

Deprecated: Use KeyPair.ProtoReflect.Descriptor instead.

func (*KeyPair) GetCommon

func (x *KeyPair) GetCommon() string

func (*KeyPair) GetKeySize

func (x *KeyPair) GetKeySize() int32

func (*KeyPair) GetKeyType

func (x *KeyPair) GetKeyType() KeyType

func (*KeyPair) GetPassword

func (x *KeyPair) GetPassword() string

func (*KeyPair) ProtoMessage

func (*KeyPair) ProtoMessage()

func (*KeyPair) ProtoReflect

func (x *KeyPair) ProtoReflect() protoreflect.Message

func (*KeyPair) Reset

func (x *KeyPair) Reset()

func (*KeyPair) String

func (x *KeyPair) String() string

type KeyType

type KeyType int32

公私钥算法类型

const (
	KeyType_RSA   KeyType = 0
	KeyType_ECDSA KeyType = 1
)

func (KeyType) Descriptor

func (KeyType) Descriptor() protoreflect.EnumDescriptor

func (KeyType) Enum

func (x KeyType) Enum() *KeyType

func (KeyType) EnumDescriptor deprecated

func (KeyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use KeyType.Descriptor instead.

func (KeyType) Number

func (x KeyType) Number() protoreflect.EnumNumber

func (KeyType) String

func (x KeyType) String() string

func (KeyType) Type

func (KeyType) Type() protoreflect.EnumType

type Log

type Log struct {

	// 日志级别设置
	// 支持debug(-1)、info(0)、warn(1)、error(2)、dpanic(3)、panic(4)、fatal(5)
	Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	// 日志输出格式,支持json or console
	Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

func (*Log) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetFormat

func (x *Log) GetFormat() string

func (*Log) GetLevel

func (x *Log) GetLevel() int32

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type Redis

type Redis struct {
	Network      string               `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr         string               `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Password     string               `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Db           int32                `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"`
	ReadTimeout  *durationpb.Duration `protobuf:"bytes,5,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
	WriteTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
	DialTimeout  *durationpb.Duration `protobuf:"bytes,7,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Redis) Descriptor deprecated

func (*Redis) Descriptor() ([]byte, []int)

Deprecated: Use Redis.ProtoReflect.Descriptor instead.

func (*Redis) GetAddr

func (x *Redis) GetAddr() string

func (*Redis) GetDb

func (x *Redis) GetDb() int32

func (*Redis) GetDialTimeout

func (x *Redis) GetDialTimeout() *durationpb.Duration

func (*Redis) GetNetwork

func (x *Redis) GetNetwork() string

func (*Redis) GetPassword

func (x *Redis) GetPassword() string

func (*Redis) GetReadTimeout

func (x *Redis) GetReadTimeout() *durationpb.Duration

func (*Redis) GetWriteTimeout

func (x *Redis) GetWriteTimeout() *durationpb.Duration

func (*Redis) ProtoMessage

func (*Redis) ProtoMessage()

func (*Redis) ProtoReflect

func (x *Redis) ProtoReflect() protoreflect.Message

func (*Redis) Reset

func (x *Redis) Reset()

func (*Redis) String

func (x *Redis) String() string

type RootCert

type RootCert struct {
	Common           string   `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
	Country          string   `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"`
	Province         string   `protobuf:"bytes,3,opt,name=province,proto3" json:"province,omitempty"`
	Locality         string   `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"`
	Organization     string   `protobuf:"bytes,5,opt,name=organization,proto3" json:"organization,omitempty"`
	OrganizationUnit string   `protobuf:"bytes,6,opt,name=organization_unit,json=organizationUnit,proto3" json:"organization_unit,omitempty"`
	Email            string   `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
	Dns              []string `protobuf:"bytes,8,rep,name=dns,proto3" json:"dns,omitempty"`
	Ip               []string `protobuf:"bytes,9,rep,name=ip,proto3" json:"ip,omitempty"`
	KeyPair          *KeyPair `protobuf:"bytes,10,opt,name=key_pair,json=keyPair,proto3" json:"key_pair,omitempty"`
	// contains filtered or unexported fields
}

自签根证书

func (*RootCert) Descriptor deprecated

func (*RootCert) Descriptor() ([]byte, []int)

Deprecated: Use RootCert.ProtoReflect.Descriptor instead.

func (*RootCert) GetCommon

func (x *RootCert) GetCommon() string

func (*RootCert) GetCountry

func (x *RootCert) GetCountry() string

func (*RootCert) GetDns

func (x *RootCert) GetDns() []string

func (*RootCert) GetEmail

func (x *RootCert) GetEmail() string

func (*RootCert) GetIp

func (x *RootCert) GetIp() []string

func (*RootCert) GetKeyPair

func (x *RootCert) GetKeyPair() *KeyPair

func (*RootCert) GetLocality

func (x *RootCert) GetLocality() string

func (*RootCert) GetOrganization

func (x *RootCert) GetOrganization() string

func (*RootCert) GetOrganizationUnit

func (x *RootCert) GetOrganizationUnit() string

func (*RootCert) GetProvince

func (x *RootCert) GetProvince() string

func (*RootCert) ProtoMessage

func (*RootCert) ProtoMessage()

func (*RootCert) ProtoReflect

func (x *RootCert) ProtoReflect() protoreflect.Message

func (*RootCert) Reset

func (x *RootCert) Reset()

func (*RootCert) String

func (x *RootCert) String() string

type Server

type Server struct {
	Http *Server_HTTP `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
	Grpc *Server_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

func (*Server) Descriptor() ([]byte, []int)

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetGrpc

func (x *Server) GetGrpc() *Server_GRPC

func (*Server) GetHttp

func (x *Server) GetHttp() *Server_HTTP

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

func (x *Server) ProtoReflect() protoreflect.Message

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type Server_GRPC

type Server_GRPC struct {
	Network string               `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr    string               `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Server_GRPC) Descriptor deprecated

func (*Server_GRPC) Descriptor() ([]byte, []int)

Deprecated: Use Server_GRPC.ProtoReflect.Descriptor instead.

func (*Server_GRPC) GetAddr

func (x *Server_GRPC) GetAddr() string

func (*Server_GRPC) GetNetwork

func (x *Server_GRPC) GetNetwork() string

func (*Server_GRPC) GetTimeout

func (x *Server_GRPC) GetTimeout() *durationpb.Duration

func (*Server_GRPC) ProtoMessage

func (*Server_GRPC) ProtoMessage()

func (*Server_GRPC) ProtoReflect

func (x *Server_GRPC) ProtoReflect() protoreflect.Message

func (*Server_GRPC) Reset

func (x *Server_GRPC) Reset()

func (*Server_GRPC) String

func (x *Server_GRPC) String() string

type Server_HTTP

type Server_HTTP struct {
	Network string               `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr    string               `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Server_HTTP) Descriptor deprecated

func (*Server_HTTP) Descriptor() ([]byte, []int)

Deprecated: Use Server_HTTP.ProtoReflect.Descriptor instead.

func (*Server_HTTP) GetAddr

func (x *Server_HTTP) GetAddr() string

func (*Server_HTTP) GetNetwork

func (x *Server_HTTP) GetNetwork() string

func (*Server_HTTP) GetTimeout

func (x *Server_HTTP) GetTimeout() *durationpb.Duration

func (*Server_HTTP) ProtoMessage

func (*Server_HTTP) ProtoMessage()

func (*Server_HTTP) ProtoReflect

func (x *Server_HTTP) ProtoReflect() protoreflect.Message

func (*Server_HTTP) Reset

func (x *Server_HTTP) Reset()

func (*Server_HTTP) String

func (x *Server_HTTP) String() string

Jump to

Keyboard shortcuts

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