repository

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func New

func New(c Config) (*sql.DB, error)

func NewApplicationRepository

func NewApplicationRepository(db *sql.DB) domain.ApplicationRepository

func NewArtifactRepository

func NewArtifactRepository(db *sql.DB) domain.ArtifactRepository

func NewBuildRepository

func NewBuildRepository(db *sql.DB) domain.BuildRepository

func NewEnvironmentRepository

func NewEnvironmentRepository(db *sql.DB) domain.EnvironmentRepository

func NewGitRepositoryRepository

func NewGitRepositoryRepository(db *sql.DB) domain.GitRepositoryRepository

func NewUserRepository

func NewUserRepository(db *sql.DB) domain.UserRepository

Types

type Config

type Config struct {
	// Host ホスト名 (default: 127.0.0.1)
	Host string `mapstructure:"host" yaml:"host"`
	// Port ポート番号 (default: 3306)
	Port int `mapstructure:"port" yaml:"port"`
	// Username ユーザー名 (default: root)
	Username string `mapstructure:"username" yaml:"username"`
	// Password パスワード (default: password)
	Password string `mapstructure:"password" yaml:"password"`
	// Database データベース名 (default: neoshowcase)
	Database string `mapstructure:"database" yaml:"database"`
	// Connection コネクション設定
	Connection struct {
		// MaxOpen 最大オープン接続数. 0は無制限 (default: 0)
		MaxOpen int `mapstructure:"maxOpen" yaml:"maxOpen"`
		// MaxIdle 最大アイドル接続数 (default: 2)
		MaxIdle int `mapstructure:"maxIdle" yaml:"maxIdle"`
		// LifeTime 待機接続維持時間. 0は無制限 (default: 0)
		LifeTime int `mapstructure:"lifetime" yaml:"lifetime"`
	} `mapstructure:"connection" yaml:"connection"`
}

Config データベース接続設定

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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