postgresv1

package
v0.0.0-...-89c8abe Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetConnection

func (x *Config) GetConnection() *Connection

func (*Config) GetMaxIdleConnections

func (x *Config) GetMaxIdleConnections() int32

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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

func (m *Config) ValidateAll() error

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 `` /* 144-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

Error satisfies the builtin error interface

func (ConnectionValidationError) ErrorName

func (e ConnectionValidationError) ErrorName() string

ErrorName returns error name.

func (ConnectionValidationError) Field

Field function returns field value.

func (ConnectionValidationError) Key

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) Enum

func (Connection_SSLMode) EnumDescriptor deprecated

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

Deprecated: Use Connection_SSLMode.Descriptor instead.

func (Connection_SSLMode) Number

func (Connection_SSLMode) String

func (x Connection_SSLMode) String() string

func (Connection_SSLMode) Type

Jump to

Keyboard shortcuts

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