Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetConnection() *Connection
- func (x *Config) GetMaxIdleConnections() int32
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
- type Connection
- func (*Connection) Descriptor() ([]byte, []int)deprecated
- func (m *Connection) GetAuthn() isConnection_Authn
- func (x *Connection) GetDbname() string
- func (x *Connection) GetHost() string
- func (x *Connection) GetPassword() string
- func (x *Connection) GetPort() uint32
- func (x *Connection) GetSslMode() Connection_SSLMode
- func (x *Connection) GetUser() string
- func (*Connection) ProtoMessage()
- func (x *Connection) ProtoReflect() protoreflect.Message
- func (x *Connection) Reset()
- func (x *Connection) String() string
- func (m *Connection) Validate() error
- func (m *Connection) ValidateAll() error
- type ConnectionMultiError
- type ConnectionValidationError
- type Connection_Password
- type Connection_SSLMode
- func (Connection_SSLMode) Descriptor() protoreflect.EnumDescriptor
- func (x Connection_SSLMode) Enum() *Connection_SSLMode
- func (Connection_SSLMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x Connection_SSLMode) Number() protoreflect.EnumNumber
- func (x Connection_SSLMode) String() string
- func (Connection_SSLMode) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( Connection_SSLMode_name = map[int32]string{ 0: "UNSPECIFIED", 1: "DISABLE", 2: "ALLOW", 3: "PREFER", 4: "REQUIRE", 5: "VERIFY_CA", 6: "VERIFY_FULL", } Connection_SSLMode_value = map[string]int32{ "UNSPECIFIED": 0, "DISABLE": 1, "ALLOW": 2, "PREFER": 3, "REQUIRE": 4, "VERIFY_CA": 5, "VERIFY_FULL": 6, } )
Enum value maps for Connection_SSLMode.
var File_config_service_db_postgres_v1_database_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Connection *Connection `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"` // The default max idle connections is 2 // Use -1 to specify zero idle connections MaxIdleConnections int32 `protobuf:"varint,2,opt,name=max_idle_connections,json=maxIdleConnections,proto3" json:"max_idle_connections,omitempty"` // contains filtered or unexported fields }
TODO: Expose more database/sql tunables.
func (*Config) Descriptor
deprecated
func (*Config) GetConnection ¶
func (x *Config) GetConnection() *Connection
func (*Config) GetMaxIdleConnections ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Config) ValidateAll ¶
ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.
type ConfigMultiError ¶
type ConfigMultiError []error
ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.
func (ConfigMultiError) AllErrors ¶
func (m ConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfigMultiError) Error ¶
func (m ConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
type Connection ¶
type Connection struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` Dbname string `protobuf:"bytes,4,opt,name=dbname,proto3" json:"dbname,omitempty"` SslMode Connection_SSLMode `` /* 146-byte string literal not displayed */ // TODO: GSSAPI, SSPI, Kerberos // // Types that are assignable to Authn: // // *Connection_Password Authn isConnection_Authn `protobuf_oneof:"authn"` // contains filtered or unexported fields }
func (*Connection) Descriptor
deprecated
func (*Connection) Descriptor() ([]byte, []int)
Deprecated: Use Connection.ProtoReflect.Descriptor instead.
func (*Connection) GetAuthn ¶
func (m *Connection) GetAuthn() isConnection_Authn
func (*Connection) GetDbname ¶
func (x *Connection) GetDbname() string
func (*Connection) GetHost ¶
func (x *Connection) GetHost() string
func (*Connection) GetPassword ¶
func (x *Connection) GetPassword() string
func (*Connection) GetPort ¶
func (x *Connection) GetPort() uint32
func (*Connection) GetSslMode ¶
func (x *Connection) GetSslMode() Connection_SSLMode
func (*Connection) GetUser ¶
func (x *Connection) GetUser() string
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) ProtoReflect ¶
func (x *Connection) ProtoReflect() protoreflect.Message
func (*Connection) Reset ¶
func (x *Connection) Reset()
func (*Connection) String ¶
func (x *Connection) String() string
func (*Connection) Validate ¶
func (m *Connection) Validate() error
Validate checks the field values on Connection with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Connection) ValidateAll ¶
func (m *Connection) ValidateAll() error
ValidateAll checks the field values on Connection with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConnectionMultiError, or nil if none found.
type ConnectionMultiError ¶
type ConnectionMultiError []error
ConnectionMultiError is an error wrapping multiple validation errors returned by Connection.ValidateAll() if the designated constraints aren't met.
func (ConnectionMultiError) AllErrors ¶
func (m ConnectionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConnectionMultiError) Error ¶
func (m ConnectionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConnectionValidationError ¶
type ConnectionValidationError struct {
// contains filtered or unexported fields
}
ConnectionValidationError is the validation error returned by Connection.Validate if the designated constraints aren't met.
func (ConnectionValidationError) Cause ¶
func (e ConnectionValidationError) Cause() error
Cause function returns cause value.
func (ConnectionValidationError) Error ¶
func (e ConnectionValidationError) Error() string
Error satisfies the builtin error interface
func (ConnectionValidationError) ErrorName ¶
func (e ConnectionValidationError) ErrorName() string
ErrorName returns error name.
func (ConnectionValidationError) Field ¶
func (e ConnectionValidationError) Field() string
Field function returns field value.
func (ConnectionValidationError) Key ¶
func (e ConnectionValidationError) Key() bool
Key function returns key value.
func (ConnectionValidationError) Reason ¶
func (e ConnectionValidationError) Reason() string
Reason function returns reason value.
type Connection_Password ¶
type Connection_Password struct {
Password string `protobuf:"bytes,6,opt,name=password,proto3,oneof"`
}
type Connection_SSLMode ¶
type Connection_SSLMode int32
const ( Connection_UNSPECIFIED Connection_SSLMode = 0 Connection_DISABLE Connection_SSLMode = 1 Connection_ALLOW Connection_SSLMode = 2 Connection_PREFER Connection_SSLMode = 3 Connection_REQUIRE Connection_SSLMode = 4 Connection_VERIFY_CA Connection_SSLMode = 5 Connection_VERIFY_FULL Connection_SSLMode = 6 )
func (Connection_SSLMode) Descriptor ¶
func (Connection_SSLMode) Descriptor() protoreflect.EnumDescriptor
func (Connection_SSLMode) Enum ¶
func (x Connection_SSLMode) Enum() *Connection_SSLMode
func (Connection_SSLMode) EnumDescriptor
deprecated
func (Connection_SSLMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use Connection_SSLMode.Descriptor instead.
func (Connection_SSLMode) Number ¶
func (x Connection_SSLMode) Number() protoreflect.EnumNumber
func (Connection_SSLMode) String ¶
func (x Connection_SSLMode) String() string
func (Connection_SSLMode) Type ¶
func (Connection_SSLMode) Type() protoreflect.EnumType