store

package
v0.0.0-...-e800d3e Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposeLibraryStore

type ComposeLibraryStore interface {
	Create(m *model.ComposeLibraryItem) error
	Update(m *model.ComposeLibraryItem) error
	GetById(id uint) (*model.ComposeLibraryItem, error)
	GetList() ([]model.ComposeLibraryItem, int64, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueName(name string) (bool, error)
	IsUniqueNameExcludeItself(name string, id uint) (bool, error)
}

type CredentialStore

type CredentialStore interface {
	Create(m *model.Credential) error
	Update(m *model.Credential) error
	GetById(id uint) (*model.Credential, error)
	GetList(pageNo, pageSize uint) ([]model.Credential, int64, error)
	IsInUse(id uint) (bool, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueName(name string) (bool, error)
	IsUniqueNameExcludeItself(name string, id uint) (bool, error)
}

type EnvironmentStore

type EnvironmentStore interface {
	Create(m *model.Environment) error
	Update(m *model.Environment) error
	GetById(id uint) (*model.Environment, error)
	GetList(pageNo, pageSize uint) ([]model.Environment, int64, error)
	GetMap() (map[string]string, error)
	IsInUse(id uint) (bool, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueName(name string) (bool, error)
	IsUniqueNameExcludeItself(name string, id uint) (bool, error)
}

type FileSystemComposeLibraryStore

type FileSystemComposeLibraryStore interface {
	Create(m *model.FileSystemComposeLibraryItem) error
	Update(m *model.FileSystemComposeLibraryItemUpdate) error
	GetByName(projectName string) (*model.FileSystemComposeLibraryItem, error)
	DeleteByName(projectName string) error
	GetList() ([]model.FileSystemComposeLibraryItemHead, int64, error)
	IsUniqueName(projectName string) (bool, error)
	IsUniqueNameExcludeItself(newProjectName string, existingProjectName string) (bool, error)
}

type LocalFileSystemComposeLibraryStore

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

func NewLocalFileSystemComposeLibraryStore

func NewLocalFileSystemComposeLibraryStore(db *gorm.DB, composeLibraryPath string) *LocalFileSystemComposeLibraryStore

func (*LocalFileSystemComposeLibraryStore) Create

func (*LocalFileSystemComposeLibraryStore) DeleteByName

func (s *LocalFileSystemComposeLibraryStore) DeleteByName(projectName string) error

func (*LocalFileSystemComposeLibraryStore) GetByName

func (*LocalFileSystemComposeLibraryStore) GetList

func (*LocalFileSystemComposeLibraryStore) IsUniqueName

func (s *LocalFileSystemComposeLibraryStore) IsUniqueName(projectName string) (bool, error)

func (*LocalFileSystemComposeLibraryStore) IsUniqueNameExcludeItself

func (s *LocalFileSystemComposeLibraryStore) IsUniqueNameExcludeItself(newProjectName string, existingProjectName string) (bool, error)

func (*LocalFileSystemComposeLibraryStore) Update

type NodeComposeProjectStore

type NodeComposeProjectStore interface {
	Create(m *model.NodeComposeProject) error
	Update(m *model.NodeComposeProject) error
	GetById(nodeId uint, id uint) (*model.NodeComposeProject, error)
	GetList(nodeId uint, pageNo, pageSize uint) ([]model.NodeComposeProject, int64, error)
	DeleteById(nodeId uint, id uint) error
	Exists(nodeId uint, id uint) (bool, error)

	IsUniqueName(nodeId uint, name string) (bool, error)
	IsUniqueNameExcludeItself(nodeId uint, name string, id uint) (bool, error)
}

type NodeComposeProjectVariableStore

type NodeComposeProjectVariableStore interface {
	Create(m *model.NodeComposeProjectVariable) error
	Update(m *model.NodeComposeProjectVariable) error
	GetById(nodeComposeProjectId uint, id uint) (*model.NodeComposeProjectVariable, error)
	GetList(nodeComposeProjectId uint, pageNo, pageSize uint) ([]model.NodeComposeProjectVariable, int64, error)
	DeleteById(nodeComposeProjectId uint, id uint) error
	Exists(nodeComposeProjectId uint, id uint) (bool, error)

	IsUniqueName(nodeComposeProjectId uint, name string) (bool, error)
	IsUniqueNameExcludeItself(nodeComposeProjectId uint, name string, id uint) (bool, error)
}

type NodeStore

type NodeStore interface {
	Create(m *model.Node) error
	Update(m *model.Node) error
	UpdateAgentVersion(id uint, version string) error
	UpdateLastPing(id uint, t time.Time) error
	UpdateContainerBaseUrl(id uint, url *string) error
	GetById(id uint) (*model.Node, error)
	GetList(pageNo, pageSize uint) ([]model.Node, int64, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueName(name string) (bool, error)
	IsUniqueNameExcludeItself(name string, id uint) (bool, error)
}

type SettingStore

type SettingStore interface {
	Create(m *model.Setting) error
	Update(m *model.Setting) error
	GetById(id string) (*model.Setting, error)
	DeleteById(id string) error
	Exists(id string) (bool, error)
}

type SqlComposeLibraryStore

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

func NewSqlComposeLibraryStore

func NewSqlComposeLibraryStore(db *gorm.DB) *SqlComposeLibraryStore

func (*SqlComposeLibraryStore) Create

func (*SqlComposeLibraryStore) DeleteById

func (s *SqlComposeLibraryStore) DeleteById(id uint) error

func (*SqlComposeLibraryStore) Exists

func (s *SqlComposeLibraryStore) Exists(id uint) (bool, error)

func (*SqlComposeLibraryStore) GetById

func (*SqlComposeLibraryStore) GetByName

func (s *SqlComposeLibraryStore) GetByName(projectName string) (*model.ComposeLibraryItem, error)

func (*SqlComposeLibraryStore) GetList

func (*SqlComposeLibraryStore) IsUniqueName

func (s *SqlComposeLibraryStore) IsUniqueName(name string) (bool, error)

func (*SqlComposeLibraryStore) IsUniqueNameExcludeItself

func (s *SqlComposeLibraryStore) IsUniqueNameExcludeItself(name string, id uint) (bool, error)

func (*SqlComposeLibraryStore) Update

type SqlCredentialStore

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

func NewSqlCredentialStore

func NewSqlCredentialStore(db *gorm.DB) *SqlCredentialStore

func (*SqlCredentialStore) Create

func (s *SqlCredentialStore) Create(m *model.Credential) error

func (*SqlCredentialStore) DeleteById

func (s *SqlCredentialStore) DeleteById(id uint) error

func (*SqlCredentialStore) Exists

func (s *SqlCredentialStore) Exists(id uint) (bool, error)

func (*SqlCredentialStore) GetById

func (s *SqlCredentialStore) GetById(id uint) (*model.Credential, error)

func (*SqlCredentialStore) GetList

func (s *SqlCredentialStore) GetList(pageNo, pageSize uint) ([]model.Credential, int64, error)

func (*SqlCredentialStore) IsInUse

func (s *SqlCredentialStore) IsInUse(id uint) (bool, error)

func (*SqlCredentialStore) IsUniqueName

func (s *SqlCredentialStore) IsUniqueName(name string) (bool, error)

func (*SqlCredentialStore) IsUniqueNameExcludeItself

func (s *SqlCredentialStore) IsUniqueNameExcludeItself(name string, id uint) (bool, error)

func (*SqlCredentialStore) Update

func (s *SqlCredentialStore) Update(m *model.Credential) error

type SqlEnvironmentStore

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

func NewSqlEnvironmentStore

func NewSqlEnvironmentStore(db *gorm.DB) *SqlEnvironmentStore

func (*SqlEnvironmentStore) Create

func (*SqlEnvironmentStore) DeleteById

func (s *SqlEnvironmentStore) DeleteById(id uint) error

func (*SqlEnvironmentStore) Exists

func (s *SqlEnvironmentStore) Exists(id uint) (bool, error)

func (*SqlEnvironmentStore) GetById

func (s *SqlEnvironmentStore) GetById(id uint) (*model.Environment, error)

func (*SqlEnvironmentStore) GetList

func (s *SqlEnvironmentStore) GetList(pageNo, pageSize uint) ([]model.Environment, int64, error)

func (*SqlEnvironmentStore) GetMap

func (s *SqlEnvironmentStore) GetMap() (map[string]string, error)

func (*SqlEnvironmentStore) IsInUse

func (s *SqlEnvironmentStore) IsInUse(id uint) (bool, error)

func (*SqlEnvironmentStore) IsUniqueName

func (s *SqlEnvironmentStore) IsUniqueName(name string) (bool, error)

func (*SqlEnvironmentStore) IsUniqueNameExcludeItself

func (s *SqlEnvironmentStore) IsUniqueNameExcludeItself(name string, id uint) (bool, error)

func (*SqlEnvironmentStore) Update

type SqlNodeComposeProjectStore

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

func NewSqlNodeComposeProjectStore

func NewSqlNodeComposeProjectStore(db *gorm.DB, composeLibraryPath string) *SqlNodeComposeProjectStore

func (*SqlNodeComposeProjectStore) Create

func (*SqlNodeComposeProjectStore) DeleteById

func (s *SqlNodeComposeProjectStore) DeleteById(nodeId uint, id uint) error

func (*SqlNodeComposeProjectStore) Exists

func (s *SqlNodeComposeProjectStore) Exists(nodeId uint, id uint) (bool, error)

func (*SqlNodeComposeProjectStore) GetById

func (*SqlNodeComposeProjectStore) GetList

func (s *SqlNodeComposeProjectStore) GetList(nodeId uint, pageNo, pageSize uint) ([]model.NodeComposeProject, int64, error)

func (*SqlNodeComposeProjectStore) IsUniqueName

func (s *SqlNodeComposeProjectStore) IsUniqueName(nodeId uint, name string) (bool, error)

func (*SqlNodeComposeProjectStore) IsUniqueNameExcludeItself

func (s *SqlNodeComposeProjectStore) IsUniqueNameExcludeItself(nodeId uint, name string, id uint) (bool, error)

func (*SqlNodeComposeProjectStore) Update

func (*SqlNodeComposeProjectStore) UpdateOldVersionRecords

func (s *SqlNodeComposeProjectStore) UpdateOldVersionRecords() error

type SqlNodeComposeProjectVariableStore

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

func NewSqlNodeComposeProjectVariableStore

func NewSqlNodeComposeProjectVariableStore(db *gorm.DB) *SqlNodeComposeProjectVariableStore

func (*SqlNodeComposeProjectVariableStore) Create

func (*SqlNodeComposeProjectVariableStore) DeleteById

func (s *SqlNodeComposeProjectVariableStore) DeleteById(nodeComposeProjectId uint, id uint) error

func (*SqlNodeComposeProjectVariableStore) Exists

func (s *SqlNodeComposeProjectVariableStore) Exists(nodeComposeProjectId uint, id uint) (bool, error)

func (*SqlNodeComposeProjectVariableStore) GetById

func (s *SqlNodeComposeProjectVariableStore) GetById(nodeComposeProjectId uint, id uint) (*model.NodeComposeProjectVariable, error)

func (*SqlNodeComposeProjectVariableStore) GetList

func (s *SqlNodeComposeProjectVariableStore) GetList(nodeComposeProjectId uint, pageNo, pageSize uint) ([]model.NodeComposeProjectVariable, int64, error)

func (*SqlNodeComposeProjectVariableStore) IsUniqueName

func (s *SqlNodeComposeProjectVariableStore) IsUniqueName(nodeComposeProjectId uint, name string) (bool, error)

func (*SqlNodeComposeProjectVariableStore) IsUniqueNameExcludeItself

func (s *SqlNodeComposeProjectVariableStore) IsUniqueNameExcludeItself(nodeComposeProjectId uint, name string, id uint) (bool, error)

func (*SqlNodeComposeProjectVariableStore) Update

type SqlNodeStore

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

func NewSqlNodeStore

func NewSqlNodeStore(db *gorm.DB) *SqlNodeStore

func (*SqlNodeStore) Create

func (s *SqlNodeStore) Create(m *model.Node) error

func (*SqlNodeStore) DeleteById

func (s *SqlNodeStore) DeleteById(id uint) error

func (*SqlNodeStore) Exists

func (s *SqlNodeStore) Exists(id uint) (bool, error)

func (*SqlNodeStore) GetById

func (s *SqlNodeStore) GetById(id uint) (*model.Node, error)

func (*SqlNodeStore) GetList

func (s *SqlNodeStore) GetList(pageNo, pageSize uint) ([]model.Node, int64, error)

func (*SqlNodeStore) IsUniqueName

func (s *SqlNodeStore) IsUniqueName(name string) (bool, error)

func (*SqlNodeStore) IsUniqueNameExcludeItself

func (s *SqlNodeStore) IsUniqueNameExcludeItself(name string, id uint) (bool, error)

func (*SqlNodeStore) Update

func (s *SqlNodeStore) Update(m *model.Node) error

func (*SqlNodeStore) UpdateAgentVersion

func (s *SqlNodeStore) UpdateAgentVersion(id uint, version string) error

func (*SqlNodeStore) UpdateContainerBaseUrl

func (s *SqlNodeStore) UpdateContainerBaseUrl(id uint, url *string) error

func (*SqlNodeStore) UpdateLastPing

func (s *SqlNodeStore) UpdateLastPing(id uint, t time.Time) error

type SqlSettingStore

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

func NewSqlSettingStore

func NewSqlSettingStore(db *gorm.DB) *SqlSettingStore

func (*SqlSettingStore) Create

func (s *SqlSettingStore) Create(m *model.Setting) error

func (*SqlSettingStore) DeleteById

func (s *SqlSettingStore) DeleteById(id string) error

func (*SqlSettingStore) Exists

func (s *SqlSettingStore) Exists(id string) (bool, error)

func (*SqlSettingStore) GetById

func (s *SqlSettingStore) GetById(id string) (*model.Setting, error)

func (*SqlSettingStore) Update

func (s *SqlSettingStore) Update(m *model.Setting) error

type SqlUserStore

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

func NewSqlUserStore

func NewSqlUserStore(db *gorm.DB) *SqlUserStore

func (*SqlUserStore) Count

func (s *SqlUserStore) Count() (int64, error)

func (*SqlUserStore) Create

func (s *SqlUserStore) Create(m *model.User) error

func (*SqlUserStore) DeleteById

func (s *SqlUserStore) DeleteById(id uint) error

func (*SqlUserStore) Exists

func (s *SqlUserStore) Exists(id uint) (bool, error)

func (*SqlUserStore) GetById

func (s *SqlUserStore) GetById(id uint) (*model.User, error)

func (*SqlUserStore) GetByUserName

func (s *SqlUserStore) GetByUserName(username string) (*model.User, error)

func (*SqlUserStore) GetList

func (s *SqlUserStore) GetList(pageNo, pageSize uint) ([]model.User, int64, error)

func (*SqlUserStore) IsUniqueEmail

func (s *SqlUserStore) IsUniqueEmail(email string) (bool, error)

func (*SqlUserStore) IsUniqueEmailExcludeItself

func (s *SqlUserStore) IsUniqueEmailExcludeItself(email string, id uint) (bool, error)

func (*SqlUserStore) IsUniqueUserName

func (s *SqlUserStore) IsUniqueUserName(userName string) (bool, error)

func (*SqlUserStore) IsUniqueUserNameExcludeItself

func (s *SqlUserStore) IsUniqueUserNameExcludeItself(userName string, id uint) (bool, error)

func (*SqlUserStore) Update

func (s *SqlUserStore) Update(m *model.User) error

type SqlVariableStore

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

func NewSqlVariableStore

func NewSqlVariableStore(db *gorm.DB) *SqlVariableStore

func (*SqlVariableStore) Create

func (s *SqlVariableStore) Create(m *model.Variable) error

func (*SqlVariableStore) DeleteById

func (s *SqlVariableStore) DeleteById(id uint) error

func (*SqlVariableStore) Exists

func (s *SqlVariableStore) Exists(id uint) (bool, error)

func (*SqlVariableStore) GetById

func (s *SqlVariableStore) GetById(id uint) (*model.Variable, error)

func (*SqlVariableStore) GetList

func (s *SqlVariableStore) GetList(pageNo, pageSize uint) ([]model.Variable, int64, error)

func (*SqlVariableStore) IsUniqueName

func (s *SqlVariableStore) IsUniqueName(name string) (bool, error)

func (*SqlVariableStore) IsUniqueNameExcludeItself

func (s *SqlVariableStore) IsUniqueNameExcludeItself(name string, id uint) (bool, error)

func (*SqlVariableStore) Update

func (s *SqlVariableStore) Update(m *model.Variable) error

type SqlVariableValueStore

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

func NewSqlVariableValueStore

func NewSqlVariableValueStore(db *gorm.DB) *SqlVariableValueStore

func (*SqlVariableValueStore) CreateOrUpdate

func (s *SqlVariableValueStore) CreateOrUpdate(m *model.VariableValue) error

func (*SqlVariableValueStore) Get

func (s *SqlVariableValueStore) Get(variableId, environmentId uint) (*model.VariableValue, error)

func (*SqlVariableValueStore) GetMap

func (s *SqlVariableValueStore) GetMap(variableId uint) (map[string]string, error)

func (*SqlVariableValueStore) GetMapByEnvironment

func (s *SqlVariableValueStore) GetMapByEnvironment(environmentId uint) (map[string]VariableValue, error)

type UserStore

type UserStore interface {
	Create(m *model.User) error
	Update(m *model.User) error
	GetById(id uint) (*model.User, error)
	GetByUserName(username string) (*model.User, error)
	GetList(pageNo, pageSize uint) ([]model.User, int64, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueUserName(userName string) (bool, error)
	IsUniqueUserNameExcludeItself(userName string, id uint) (bool, error)

	Count() (int64, error)
}

type VariableStore

type VariableStore interface {
	Create(m *model.Variable) error
	Update(m *model.Variable) error
	GetById(id uint) (*model.Variable, error)
	GetList(offset, limit uint) ([]model.Variable, int64, error)
	DeleteById(id uint) error
	Exists(id uint) (bool, error)

	IsUniqueName(name string) (bool, error)
	IsUniqueNameExcludeItself(name string, id uint) (bool, error)
}

type VariableValue

type VariableValue struct {
	Value    *string
	IsSecret bool
}

type VariableValueStore

type VariableValueStore interface {
	CreateOrUpdate(m *model.VariableValue) error
	Get(variableId, environmentId uint) (*model.VariableValue, error)
	GetMap(variableId uint) (map[string]string, error)
	GetMapByEnvironment(environmentId uint) (map[string]VariableValue, error)
}

Jump to

Keyboard shortcuts

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