databasev1

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_runtime_data_database_v1_database_proto protoreflect.FileDescriptor
View Source
var File_runtime_data_database_v1_document_proto protoreflect.FileDescriptor
View Source
var File_runtime_data_database_v1_migration_proto protoreflect.FileDescriptor
View Source
var File_runtime_data_database_v1_mongo_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DatabaseConfig

type DatabaseConfig struct {

	// Unique name for this database configuration instance.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Debugging
	Debug bool `protobuf:"varint,2,opt,name=debug,proto3" json:"debug,omitempty"`
	// Dialect name: mysql, postgresql, sqlite......
	Dialect string `protobuf:"bytes,3,opt,name=dialect,proto3" json:"dialect,omitempty"`
	// Data source (DSN string)
	Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
	// Data migration
	Migration *Migration `protobuf:"bytes,10,opt,name=migration,proto3" json:"migration,omitempty"`
	// Link tracking switch
	EnableTrace bool `protobuf:"varint,12,opt,name=enable_trace,proto3" json:"enable_trace,omitempty"`
	// Performance analysis switch
	EnableMetrics bool `protobuf:"varint,13,opt,name=enable_metrics,proto3" json:"enable_metrics,omitempty"`
	// Maximum number of free connections in the connection pool
	MaxIdleConnections int32 `protobuf:"varint,20,opt,name=max_idle_connections,proto3" json:"max_idle_connections,omitempty"`
	// Maximum number of open connections in the connection pool
	MaxOpenConnections int32 `protobuf:"varint,21,opt,name=max_open_connections,proto3" json:"max_open_connections,omitempty"`
	// Maximum length of time that the connection can be reused
	ConnectionMaxLifetime int64 `protobuf:"varint,22,opt,name=connection_max_lifetime,proto3" json:"connection_max_lifetime,omitempty"`
	// Maximum number of connections in the connection pool for reading
	ConnectionMaxIdleTime int64 `protobuf:"varint,23,opt,name=connection_max_idle_time,proto3" json:"connection_max_idle_time,omitempty"`
	// Optional custom configuration for database types not explicitly defined.
	Customize *structpb.Struct `protobuf:"bytes,100,opt,name=customize,proto3,oneof" json:"customize,omitempty"`
	// contains filtered or unexported fields
}

DatabaseConfig defines the configuration for a generic database connection. This message was extracted from mysql.proto and renamed for consistency.

func (*DatabaseConfig) Descriptor deprecated

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

Deprecated: Use DatabaseConfig.ProtoReflect.Descriptor instead.

func (*DatabaseConfig) GetConnectionMaxIdleTime

func (x *DatabaseConfig) GetConnectionMaxIdleTime() int64

func (*DatabaseConfig) GetConnectionMaxLifetime

func (x *DatabaseConfig) GetConnectionMaxLifetime() int64

func (*DatabaseConfig) GetCustomize

func (x *DatabaseConfig) GetCustomize() *structpb.Struct

func (*DatabaseConfig) GetDebug

func (x *DatabaseConfig) GetDebug() bool

func (*DatabaseConfig) GetDialect

func (x *DatabaseConfig) GetDialect() string

func (*DatabaseConfig) GetEnableMetrics

func (x *DatabaseConfig) GetEnableMetrics() bool

func (*DatabaseConfig) GetEnableTrace

func (x *DatabaseConfig) GetEnableTrace() bool

func (*DatabaseConfig) GetMaxIdleConnections

func (x *DatabaseConfig) GetMaxIdleConnections() int32

func (*DatabaseConfig) GetMaxOpenConnections

func (x *DatabaseConfig) GetMaxOpenConnections() int32

func (*DatabaseConfig) GetMigration

func (x *DatabaseConfig) GetMigration() *Migration

func (*DatabaseConfig) GetName

func (x *DatabaseConfig) GetName() string

func (*DatabaseConfig) GetSource

func (x *DatabaseConfig) GetSource() string

func (*DatabaseConfig) ProtoMessage

func (*DatabaseConfig) ProtoMessage()

func (*DatabaseConfig) ProtoReflect

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

func (*DatabaseConfig) Reset

func (x *DatabaseConfig) Reset()

func (*DatabaseConfig) String

func (x *DatabaseConfig) String() string

func (*DatabaseConfig) Validate

func (m *DatabaseConfig) Validate() error

Validate checks the field values on DatabaseConfig 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 (*DatabaseConfig) ValidateAll

func (m *DatabaseConfig) ValidateAll() error

ValidateAll checks the field values on DatabaseConfig 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 DatabaseConfigMultiError, or nil if none found.

type DatabaseConfigMultiError

type DatabaseConfigMultiError []error

DatabaseConfigMultiError is an error wrapping multiple validation errors returned by DatabaseConfig.ValidateAll() if the designated constraints aren't met.

func (DatabaseConfigMultiError) AllErrors

func (m DatabaseConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DatabaseConfigMultiError) Error

func (m DatabaseConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DatabaseConfigValidationError

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

DatabaseConfigValidationError is the validation error returned by DatabaseConfig.Validate if the designated constraints aren't met.

func (DatabaseConfigValidationError) Cause

Cause function returns cause value.

func (DatabaseConfigValidationError) Error

Error satisfies the builtin error interface

func (DatabaseConfigValidationError) ErrorName

func (e DatabaseConfigValidationError) ErrorName() string

ErrorName returns error name.

func (DatabaseConfigValidationError) Field

Field function returns field value.

func (DatabaseConfigValidationError) Key

Key function returns key value.

func (DatabaseConfigValidationError) Reason

Reason function returns reason value.

type DocumentConfig

type DocumentConfig struct {

	// Unique name for this document database configuration instance.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of document database, e.g., "mongo", "customize".
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Optional MongoDB configuration.
	Mongo *MongoConfig `protobuf:"bytes,10,opt,name=mongo,proto3,oneof" json:"mongo,omitempty"`
	// Optional custom configuration for document database types not explicitly defined.
	Customize *structpb.Struct `protobuf:"bytes,100,opt,name=customize,proto3,oneof" json:"customize,omitempty"`
	// contains filtered or unexported fields
}

DocumentConfig defines the configuration for a document database instance.

func (*DocumentConfig) Descriptor deprecated

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

Deprecated: Use DocumentConfig.ProtoReflect.Descriptor instead.

func (*DocumentConfig) GetCustomize

func (x *DocumentConfig) GetCustomize() *structpb.Struct

func (*DocumentConfig) GetMongo

func (x *DocumentConfig) GetMongo() *MongoConfig

func (*DocumentConfig) GetName

func (x *DocumentConfig) GetName() string

func (*DocumentConfig) GetType

func (x *DocumentConfig) GetType() string

func (*DocumentConfig) ProtoMessage

func (*DocumentConfig) ProtoMessage()

func (*DocumentConfig) ProtoReflect

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

func (*DocumentConfig) Reset

func (x *DocumentConfig) Reset()

func (*DocumentConfig) String

func (x *DocumentConfig) String() string

func (*DocumentConfig) Validate

func (m *DocumentConfig) Validate() error

Validate checks the field values on DocumentConfig 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 (*DocumentConfig) ValidateAll

func (m *DocumentConfig) ValidateAll() error

ValidateAll checks the field values on DocumentConfig 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 DocumentConfigMultiError, or nil if none found.

type DocumentConfigMultiError

type DocumentConfigMultiError []error

DocumentConfigMultiError is an error wrapping multiple validation errors returned by DocumentConfig.ValidateAll() if the designated constraints aren't met.

func (DocumentConfigMultiError) AllErrors

func (m DocumentConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DocumentConfigMultiError) Error

func (m DocumentConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DocumentConfigValidationError

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

DocumentConfigValidationError is the validation error returned by DocumentConfig.Validate if the designated constraints aren't met.

func (DocumentConfigValidationError) Cause

Cause function returns cause value.

func (DocumentConfigValidationError) Error

Error satisfies the builtin error interface

func (DocumentConfigValidationError) ErrorName

func (e DocumentConfigValidationError) ErrorName() string

ErrorName returns error name.

func (DocumentConfigValidationError) Field

Field function returns field value.

func (DocumentConfigValidationError) Key

Key function returns key value.

func (DocumentConfigValidationError) Reason

Reason function returns reason value.

type Migration

type Migration struct {
	Enabled bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Path    string   `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Names   []string `protobuf:"bytes,3,rep,name=names,proto3" json:"names,omitempty"`
	Version string   `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	Mode    string   `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

Migration defines database migration settings. This message was extracted from mysql.proto for better modularity.

func (*Migration) Descriptor deprecated

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

Deprecated: Use Migration.ProtoReflect.Descriptor instead.

func (*Migration) GetEnabled

func (x *Migration) GetEnabled() bool

func (*Migration) GetMode

func (x *Migration) GetMode() string

func (*Migration) GetNames

func (x *Migration) GetNames() []string

func (*Migration) GetPath

func (x *Migration) GetPath() string

func (*Migration) GetVersion

func (x *Migration) GetVersion() string

func (*Migration) ProtoMessage

func (*Migration) ProtoMessage()

func (*Migration) ProtoReflect

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

func (*Migration) Reset

func (x *Migration) Reset()

func (*Migration) String

func (x *Migration) String() string

func (*Migration) Validate

func (m *Migration) Validate() error

Validate checks the field values on Migration 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 (*Migration) ValidateAll

func (m *Migration) ValidateAll() error

ValidateAll checks the field values on Migration 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 MigrationMultiError, or nil if none found.

type MigrationMultiError

type MigrationMultiError []error

MigrationMultiError is an error wrapping multiple validation errors returned by Migration.ValidateAll() if the designated constraints aren't met.

func (MigrationMultiError) AllErrors

func (m MigrationMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MigrationMultiError) Error

func (m MigrationMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MigrationValidationError

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

MigrationValidationError is the validation error returned by Migration.Validate if the designated constraints aren't met.

func (MigrationValidationError) Cause

func (e MigrationValidationError) Cause() error

Cause function returns cause value.

func (MigrationValidationError) Error

func (e MigrationValidationError) Error() string

Error satisfies the builtin error interface

func (MigrationValidationError) ErrorName

func (e MigrationValidationError) ErrorName() string

ErrorName returns error name.

func (MigrationValidationError) Field

func (e MigrationValidationError) Field() string

Field function returns field value.

func (MigrationValidationError) Key

Key function returns key value.

func (MigrationValidationError) Reason

func (e MigrationValidationError) Reason() string

Reason function returns reason value.

type MongoConfig

type MongoConfig struct {
	Uri            string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	Database       string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
	Username       string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	Password       string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	AuthSource     bool   `protobuf:"varint,5,opt,name=auth_source,proto3" json:"auth_source,omitempty"`
	MaxPoolSize    int32  `protobuf:"varint,6,opt,name=max_pool_size,proto3" json:"max_pool_size,omitempty"`
	MinPoolSize    int32  `protobuf:"varint,7,opt,name=min_pool_size,proto3" json:"min_pool_size,omitempty"`
	ConnectTimeout int64  `protobuf:"varint,8,opt,name=connect_timeout,proto3" json:"connect_timeout,omitempty"`
	// contains filtered or unexported fields
}

MongoConfig defines the configuration for a MongoDB connection. This message was extracted from storage.proto and renamed for consistency.

func (*MongoConfig) Descriptor deprecated

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

Deprecated: Use MongoConfig.ProtoReflect.Descriptor instead.

func (*MongoConfig) GetAuthSource

func (x *MongoConfig) GetAuthSource() bool

func (*MongoConfig) GetConnectTimeout

func (x *MongoConfig) GetConnectTimeout() int64

func (*MongoConfig) GetDatabase

func (x *MongoConfig) GetDatabase() string

func (*MongoConfig) GetMaxPoolSize

func (x *MongoConfig) GetMaxPoolSize() int32

func (*MongoConfig) GetMinPoolSize

func (x *MongoConfig) GetMinPoolSize() int32

func (*MongoConfig) GetPassword

func (x *MongoConfig) GetPassword() string

func (*MongoConfig) GetUri

func (x *MongoConfig) GetUri() string

func (*MongoConfig) GetUsername

func (x *MongoConfig) GetUsername() string

func (*MongoConfig) ProtoMessage

func (*MongoConfig) ProtoMessage()

func (*MongoConfig) ProtoReflect

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

func (*MongoConfig) Reset

func (x *MongoConfig) Reset()

func (*MongoConfig) String

func (x *MongoConfig) String() string

func (*MongoConfig) Validate

func (m *MongoConfig) Validate() error

Validate checks the field values on MongoConfig 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 (*MongoConfig) ValidateAll

func (m *MongoConfig) ValidateAll() error

ValidateAll checks the field values on MongoConfig 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 MongoConfigMultiError, or nil if none found.

type MongoConfigMultiError

type MongoConfigMultiError []error

MongoConfigMultiError is an error wrapping multiple validation errors returned by MongoConfig.ValidateAll() if the designated constraints aren't met.

func (MongoConfigMultiError) AllErrors

func (m MongoConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MongoConfigMultiError) Error

func (m MongoConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MongoConfigValidationError

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

MongoConfigValidationError is the validation error returned by MongoConfig.Validate if the designated constraints aren't met.

func (MongoConfigValidationError) Cause

Cause function returns cause value.

func (MongoConfigValidationError) Error

Error satisfies the builtin error interface

func (MongoConfigValidationError) ErrorName

func (e MongoConfigValidationError) ErrorName() string

ErrorName returns error name.

func (MongoConfigValidationError) Field

Field function returns field value.

func (MongoConfigValidationError) Key

Key function returns key value.

func (MongoConfigValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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