dao

package
v0.0.0-...-8fb4ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(c *conf.Config) (err error)

Init 初始化数据库连接

Types

type Dao

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

Dao def

func GetDao

func GetDao() *Dao

GetDao 返回 Dao 实例

func (*Dao) AppExist

func (d *Dao) AppExist(appName string) bool

func (*Dao) ClusterExist

func (d *Dao) ClusterExist(appName, clusterName string) bool

func (*Dao) CreateApp

func (d *Dao) CreateApp(appName, description string) (*model.App, error)

func (*Dao) CreateCluster

func (d *Dao) CreateCluster(appName, clusterName, description string) (*model.Cluster, error)

func (*Dao) CreateNamespace

func (d *Dao) CreateNamespace(appName, clusterName, namespaceName, format, description string) (*model.Namespace, error)

func (*Dao) DeleteApp

func (d *Dao) DeleteApp(appName string) error

func (*Dao) DeleteCluster

func (d *Dao) DeleteCluster(appName, clusterName string) error

func (*Dao) DeleteNamespace

func (d *Dao) DeleteNamespace(appName, clusterName, namespaceName string) error

func (*Dao) Disconnect

func (d *Dao) Disconnect() error

func (*Dao) ListApps

func (d *Dao) ListApps() (apps []model.App, err error)

func (*Dao) ListClusters

func (d *Dao) ListClusters(appName string) (clusters []model.Cluster, err error)

func (*Dao) ListNamespaces

func (d *Dao) ListNamespaces(appName, clusterName string) (namespaces []*model.Namespace, err error)

func (*Dao) NamespaceExist

func (d *Dao) NamespaceExist(appName, clusterName, namespaceName string) bool

func (*Dao) Ping

func (d *Dao) Ping() error

func (*Dao) ReadConfig

func (d *Dao) ReadConfig(appName, clusterName, namespaceName string) (*model.Namespace, error)

func (*Dao) ReleaseConfig

func (d *Dao) ReleaseConfig(appName, clusterName, namespaceName, value, comment string, broadcast func() error) error

func (*Dao) UpdateConfig

func (d *Dao) UpdateConfig(appName, clusterName, namespaceName, value string) error

Jump to

Keyboard shortcuts

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