Documentation ¶
Index ¶
- Variables
- func New(c Config) (*sql.DB, error)
- func NewApplicationRepository(db *sql.DB) domain.ApplicationRepository
- func NewArtifactRepository(db *sql.DB) domain.ArtifactRepository
- func NewBuildRepository(db *sql.DB) domain.BuildRepository
- func NewEnvironmentRepository(db *sql.DB) domain.EnvironmentRepository
- func NewGitRepositoryRepository(db *sql.DB) domain.GitRepositoryRepository
- func NewRepositoryCommitRepository(db *sql.DB) domain.RepositoryCommitRepository
- func NewRuntimeImageRepository(db *sql.DB) domain.RuntimeImageRepository
- func NewUserRepository(db *sql.DB) domain.UserRepository
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
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 NewRepositoryCommitRepository ¶ added in v1.3.0
func NewRepositoryCommitRepository(db *sql.DB) domain.RepositoryCommitRepository
func NewRuntimeImageRepository ¶ added in v1.5.0
func NewRuntimeImageRepository(db *sql.DB) domain.RuntimeImageRepository
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 データベース接続設定
Source Files ¶
Click to show internal directories.
Click to hide internal directories.