mysql

package
v0.0.0-...-e91ad15 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDBHost     = "MYSQL_HOST"
	EnvDBPort     = "MYSQL_PORT"
	EnvDBDatabase = "MYSQL_DB_NAME"
	EnvDBUser     = "MYSQL_USER"
	EnvDBPassword = "MYSQL_PASSWORD"
	EnvLogMode    = "MYSQL_LOGMODE"
)

Constants down below defines configurations to initialize a mysql backend storage service, user should set sls environment variables in Dockerfile or deployment manifests files, for security user should better init environment variables by referencing Secret key as down below: spec:

containers:
- name: xxx-container
  image: xxx
  env:
    - name: MYSQL_HOST
      valueFrom:
        secretKeyRef:
          name: my-mysql-secret
          key: host

Variables

This section is empty.

Functions

func GetMysqlDBSource

func GetMysqlDBSource() (dbSource, logMode string, err error)

func NewMysqlBackendService

func NewMysqlBackendService() backends.ObjectStorageBackend

Types

type Model

type Model struct {
	Name       string    `gorm:"type:varchar(256);column:model_name" json:"model_name"`
	Version    string    `gorm:"type:varchar(256);column:model_version" json:"model_version"`
	OSSPath    string    `gorm:"type:varchar(256);column:oss_path" json:"oss_path"`
	JobID      string    `gorm:"type:varchar(256);column:job_id" json:"job_id"`
	GmtCreated time.Time `gorm:"type:datetime;column:gmt_created" json:"gmt_created"`
}

func (Model) TableName

func (model Model) TableName() string

Jump to

Keyboard shortcuts

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