server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	ListConfigGroupBrief() ([]*app.ConfigGroup, error)
	ExistsConfigGroupByAppAndEnvironment(appName, environment string) bool
	ExistsConfigGroupById(id int64) bool
	InsertConfigGroup(cg *app.ConfigGroup) (int64, error)
	RetrieveConfigGroupBrief(id int64) (*app.ConfigGroup, error)
	RetrieveConfigGroupDetail(id int64) (*app.ConfigGroup, error)
	UpdateConfigGroupAssociation(groupId int64, addFileIds []int64, delFileIds []int64) error
	UpdateConfigGroupOutdated(id int64, outdated bool) error

	ListConfigFileBrief() ([]*app.ConfigFile, error)
	ExistsConfigFileByNameAndNamespaceId(filename string, namespaceId int64) bool
	ExistsConfigFileById(id int64) bool
	InsertConfigFileWithItems(cf *app.ConfigFile) (int64, error)
	RetrieveConfigFileDetail(id int64) (*app.ConfigFile, error)
	UpdateConfigFile(fileId int64, items []*app.ConfigItem) error
}

type Service

type Service struct {
	Repo Repository
}

func (*Service) CreateConfigFile

func (service *Service) CreateConfigFile(name string, namespaceId int64, content string) (int64, error)

func (*Service) CreateConfigGroup

func (service *Service) CreateConfigGroup(appName, environment string) (int64, error)

func (*Service) ExistsConfigFileById

func (service *Service) ExistsConfigFileById(id int64) bool

func (*Service) ExistsConfigFileByNameAndNamespaceId

func (service *Service) ExistsConfigFileByNameAndNamespaceId(filename string, namespaceId int64) bool

func (*Service) ExistsConfigGroupByAppAndEnvironment

func (service *Service) ExistsConfigGroupByAppAndEnvironment(appName, environment string) bool

func (*Service) ExistsConfigGroupById

func (service *Service) ExistsConfigGroupById(id int64) bool

func (*Service) ListConfigFile

func (service *Service) ListConfigFile() ([]map[string]interface{}, error)

func (*Service) ListConfigGroup

func (service *Service) ListConfigGroup() ([]map[string]interface{}, error)

func (*Service) PublishConfigGroup

func (service *Service) PublishConfigGroup(id int64) error

func (*Service) UpdateConfigFile

func (service *Service) UpdateConfigFile(id int64, content string) error

func (*Service) UpdateConfigGroupAssociation

func (service *Service) UpdateConfigGroupAssociation(id int64, fileIds []int64) error

func (*Service) ViewConfigFile

func (service *Service) ViewConfigFile(id int64) (map[string]interface{}, error)

func (*Service) ViewConfigGroup

func (service *Service) ViewConfigGroup(id int64) (map[string]interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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