pg

package
v0.0.0-...-6794c67 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_postgresql_config_request_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConfigRequest

type ConfigRequest struct {
	V1 *ConfigRequest_V1 `protobuf:"bytes,3,opt,name=v1,proto3" json:"v1,omitempty" toml:"v1,omitempty" mapstructure:"v1,omitempty"`
	// contains filtered or unexported fields
}

func DefaultConfigRequest

func DefaultConfigRequest() *ConfigRequest

DefaultConfigRequest returns a new instance of ConfigRequest with default values.

func NewConfigRequest

func NewConfigRequest() *ConfigRequest

NewConfigRequest returns a new instance of ConfigRequest with zero values.

func (*ConfigRequest) BindPort

func (m *ConfigRequest) BindPort(name string, value uint16) error

BindPort sets the port tagged with the given name

func (*ConfigRequest) Descriptor deprecated

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

Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead.

func (*ConfigRequest) GetPort

func (m *ConfigRequest) GetPort(name string) (uint16, error)

GetPort gets the port tagged with the given name. If the value is not set, it returns 0.

func (*ConfigRequest) GetSecret

func (m *ConfigRequest) GetSecret(name string) *wrappers.StringValue

GetSecret gets a secret by name. Returns nil if it is not set

func (*ConfigRequest) GetV1

func (x *ConfigRequest) GetV1() *ConfigRequest_V1

func (*ConfigRequest) ListPorts

func (m *ConfigRequest) ListPorts() []a2conf.PortInfo

ListPorts lists all the ports exposed by the config

func (*ConfigRequest) ListSecrets

func (m *ConfigRequest) ListSecrets() []a2conf.SecretInfo

ListSecrets lists all the secrets exposed by the config

func (*ConfigRequest) PrepareSystemConfig

func (c *ConfigRequest) PrepareSystemConfig(creds *config.TLSCredentials) (config.PreparedSystemConfig, error)

PrepareSystemConfig returns a system configuration that can be used to start the service.

func (*ConfigRequest) ProtoMessage

func (*ConfigRequest) ProtoMessage()

func (*ConfigRequest) ProtoReflect

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

func (*ConfigRequest) Reset

func (x *ConfigRequest) Reset()

func (*ConfigRequest) ServiceName

func (m *ConfigRequest) ServiceName() string

ServiceName returns the name of the service this config belongs to

func (*ConfigRequest) SetGlobalConfig

func (c *ConfigRequest) SetGlobalConfig(g *config.GlobalConfig)

SetGlobalConfig imports settings from the global configuration

func (*ConfigRequest) SetSecret

func (m *ConfigRequest) SetSecret(name string, value *wrappers.StringValue) error

SetSecret sets a secret by name. Returns ErrSecretNotFound if the secret does not exist

func (*ConfigRequest) String

func (x *ConfigRequest) String() string

func (*ConfigRequest) Validate

func (c *ConfigRequest) Validate() error

Validate validates that the config is sufficient to start the Service. If validation succeeds it will return nil, if it fails it will return a new instance of config.InvalidConfigError that has the missing keys and invalid fields populated.

type ConfigRequest_V1

type ConfigRequest_V1 struct {
	Sys *ConfigRequest_V1_System  `protobuf:"bytes,1,opt,name=sys,proto3" json:"sys,omitempty" toml:"sys,omitempty" mapstructure:"sys,omitempty"`
	Svc *ConfigRequest_V1_Service `protobuf:"bytes,2,opt,name=svc,proto3" json:"svc,omitempty" toml:"svc,omitempty" mapstructure:"svc,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1) GetSvc

func (*ConfigRequest_V1) GetSys

func (*ConfigRequest_V1) ProtoMessage

func (*ConfigRequest_V1) ProtoMessage()

func (*ConfigRequest_V1) ProtoReflect

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

func (*ConfigRequest_V1) Reset

func (x *ConfigRequest_V1) Reset()

func (*ConfigRequest_V1) String

func (x *ConfigRequest_V1) String() string

type ConfigRequest_V1_Service

type ConfigRequest_V1_Service struct {
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_Service) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_Service.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_Service) ProtoMessage

func (*ConfigRequest_V1_Service) ProtoMessage()

func (*ConfigRequest_V1_Service) ProtoReflect

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

func (*ConfigRequest_V1_Service) Reset

func (x *ConfigRequest_V1_Service) Reset()

func (*ConfigRequest_V1_Service) String

func (x *ConfigRequest_V1_Service) String() string

type ConfigRequest_V1_System

type ConfigRequest_V1_System struct {
	Service   *ConfigRequest_V1_System_Service   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty" toml:"service,omitempty" mapstructure:"service,omitempty"`
	Pg        *ConfigRequest_V1_System_PGConfig  `protobuf:"bytes,2,opt,name=pg,proto3" json:"pg,omitempty" toml:"pg,omitempty" mapstructure:"pg,omitempty"`
	Logger    *ConfigRequest_V1_System_Logger    `protobuf:"bytes,3,opt,name=logger,proto3" json:"logger,omitempty" toml:"logger,omitempty" mapstructure:"logger,omitempty"`
	Superuser *ConfigRequest_V1_System_Superuser `` /* 133-byte string literal not displayed */
	Tls       *shared.TLSCredentials             `protobuf:"bytes,5,opt,name=tls,proto3" json:"tls,omitempty" toml:"tls,omitempty" mapstructure:"tls,omitempty"`
	Disable   *wrappers.BoolValue                `protobuf:"bytes,6,opt,name=disable,proto3" json:"disable,omitempty" toml:"disable,omitempty" mapstructure:"disable,omitempty"` // If set to true, automate-postgresql will noop. Derived from the global config
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_System.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System) GetDisable

func (x *ConfigRequest_V1_System) GetDisable() *wrappers.BoolValue

func (*ConfigRequest_V1_System) GetLogger

func (*ConfigRequest_V1_System) GetPg

func (*ConfigRequest_V1_System) GetService

func (*ConfigRequest_V1_System) GetSuperuser

func (*ConfigRequest_V1_System) GetTls

func (*ConfigRequest_V1_System) ProtoMessage

func (*ConfigRequest_V1_System) ProtoMessage()

func (*ConfigRequest_V1_System) ProtoReflect

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

func (*ConfigRequest_V1_System) Reset

func (x *ConfigRequest_V1_System) Reset()

func (*ConfigRequest_V1_System) String

func (x *ConfigRequest_V1_System) String() string

type ConfigRequest_V1_System_Logger

type ConfigRequest_V1_System_Logger struct {
	Level *wrappers.StringValue `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty" toml:"level,omitempty" mapstructure:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Logger) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_System_Logger.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Logger) GetLevel

func (*ConfigRequest_V1_System_Logger) ProtoMessage

func (*ConfigRequest_V1_System_Logger) ProtoMessage()

func (*ConfigRequest_V1_System_Logger) ProtoReflect

func (*ConfigRequest_V1_System_Logger) Reset

func (x *ConfigRequest_V1_System_Logger) Reset()

func (*ConfigRequest_V1_System_Logger) String

type ConfigRequest_V1_System_PGConfig

type ConfigRequest_V1_System_PGConfig struct {
	MaxWalSize                 *wrappers.StringValue `` /* 161-byte string literal not displayed */
	MinWalSize                 *wrappers.StringValue `` /* 161-byte string literal not displayed */
	WalKeepSegments            *wrappers.Int32Value  `` /* 186-byte string literal not displayed */
	CheckpointTimeout          *wrappers.StringValue `` /* 192-byte string literal not displayed */
	CheckpointCompletionTarget *wrappers.FloatValue  `` /* 241-byte string literal not displayed */
	CheckpointWarning          *wrappers.StringValue `` /* 192-byte string literal not displayed */
	EffectiveCacheSize         *wrappers.StringValue `` /* 201-byte string literal not displayed */
	MaxConnections             *wrappers.Int32Value  `` /* 178-byte string literal not displayed */
	MaxLocksPerTransaction     *wrappers.Int32Value  `` /* 226-byte string literal not displayed */
	Md5AuthCidrAddresses       []string              `` /* 216-byte string literal not displayed */
	SharedBuffers              *wrappers.StringValue `` /* 173-byte string literal not displayed */
	WorkMem                    *wrappers.StringValue `` /* 143-byte string literal not displayed */
	SslCiphers                 *wrappers.StringValue `` /* 158-byte string literal not displayed */
	LogDisconnections          *wrappers.StringValue `` /* 193-byte string literal not displayed */
	ClientMinMessages          *wrappers.StringValue `` /* 197-byte string literal not displayed */
	// contains filtered or unexported fields
}

func DefaultPGConfig

func DefaultPGConfig() *ConfigRequest_V1_System_PGConfig

DefaultPGConfig returns a new instance of ConfigRequest_PGConfig with default values.

func NewPGConfig

func NewPGConfig() *ConfigRequest_V1_System_PGConfig

NewPGConfig returns a new instance of ConfigRequest_PGConfig with zero values.

func (*ConfigRequest_V1_System_PGConfig) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_System_PGConfig.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_PGConfig) GetCheckpointCompletionTarget

func (x *ConfigRequest_V1_System_PGConfig) GetCheckpointCompletionTarget() *wrappers.FloatValue

func (*ConfigRequest_V1_System_PGConfig) GetCheckpointTimeout

func (x *ConfigRequest_V1_System_PGConfig) GetCheckpointTimeout() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetCheckpointWarning

func (x *ConfigRequest_V1_System_PGConfig) GetCheckpointWarning() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetClientMinMessages

func (x *ConfigRequest_V1_System_PGConfig) GetClientMinMessages() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetEffectiveCacheSize

func (x *ConfigRequest_V1_System_PGConfig) GetEffectiveCacheSize() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetLogDisconnections

func (x *ConfigRequest_V1_System_PGConfig) GetLogDisconnections() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetMaxConnections

func (x *ConfigRequest_V1_System_PGConfig) GetMaxConnections() *wrappers.Int32Value

func (*ConfigRequest_V1_System_PGConfig) GetMaxLocksPerTransaction

func (x *ConfigRequest_V1_System_PGConfig) GetMaxLocksPerTransaction() *wrappers.Int32Value

func (*ConfigRequest_V1_System_PGConfig) GetMaxWalSize

func (*ConfigRequest_V1_System_PGConfig) GetMd5AuthCidrAddresses

func (x *ConfigRequest_V1_System_PGConfig) GetMd5AuthCidrAddresses() []string

func (*ConfigRequest_V1_System_PGConfig) GetMinWalSize

func (*ConfigRequest_V1_System_PGConfig) GetSharedBuffers

func (x *ConfigRequest_V1_System_PGConfig) GetSharedBuffers() *wrappers.StringValue

func (*ConfigRequest_V1_System_PGConfig) GetSslCiphers

func (*ConfigRequest_V1_System_PGConfig) GetWalKeepSegments

func (x *ConfigRequest_V1_System_PGConfig) GetWalKeepSegments() *wrappers.Int32Value

func (*ConfigRequest_V1_System_PGConfig) GetWorkMem

func (*ConfigRequest_V1_System_PGConfig) ProtoMessage

func (*ConfigRequest_V1_System_PGConfig) ProtoMessage()

func (*ConfigRequest_V1_System_PGConfig) ProtoReflect

func (*ConfigRequest_V1_System_PGConfig) Reset

func (*ConfigRequest_V1_System_PGConfig) String

type ConfigRequest_V1_System_Service

type ConfigRequest_V1_System_Service struct {

	// Deprecated: Do not use.
	Host *wrappers.StringValue `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty" toml:"host,omitempty" mapstructure:"host,omitempty"` // The listen host is no longer setable(localhost only)
	Port *wrappers.Int32Value  `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty" toml:"port,omitempty" mapstructure:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Service) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_System_Service.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Service) GetHost deprecated

Deprecated: Do not use.

func (*ConfigRequest_V1_System_Service) GetPort

func (*ConfigRequest_V1_System_Service) ProtoMessage

func (*ConfigRequest_V1_System_Service) ProtoMessage()

func (*ConfigRequest_V1_System_Service) ProtoReflect

func (*ConfigRequest_V1_System_Service) Reset

func (*ConfigRequest_V1_System_Service) String

type ConfigRequest_V1_System_Superuser

type ConfigRequest_V1_System_Superuser struct {
	Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigRequest_V1_System_Superuser) Descriptor deprecated

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

Deprecated: Use ConfigRequest_V1_System_Superuser.ProtoReflect.Descriptor instead.

func (*ConfigRequest_V1_System_Superuser) GetName

func (*ConfigRequest_V1_System_Superuser) ProtoMessage

func (*ConfigRequest_V1_System_Superuser) ProtoMessage()

func (*ConfigRequest_V1_System_Superuser) ProtoReflect

func (*ConfigRequest_V1_System_Superuser) Reset

func (*ConfigRequest_V1_System_Superuser) String

Jump to

Keyboard shortcuts

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