service

package
v0.0.0-...-3986ddd Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const TokenKey = "baas user secret"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainService

type ChainService struct {
	DbEngine      *xorm.Engine
	FabircService *FabricService
}

func NewChainService

func NewChainService(engine *xorm.Engine, fabircService *FabricService) *ChainService

func (*ChainService) Add

func (l *ChainService) Add(chain *entity.Chain) (bool, string)

func (*ChainService) BuildChain

func (l *ChainService) BuildChain(chain *entity.Chain) (bool, string)

func (*ChainService) Delete

func (l *ChainService) Delete(id int) (bool, string)

func (*ChainService) DownloadChainArtifacts

func (l *ChainService) DownloadChainArtifacts(chain *entity.Chain) (io.Reader, int64, string)

func (*ChainService) GetByChain

func (l *ChainService) GetByChain(chain *entity.Chain) (bool, *entity.Chain)

func (*ChainService) GetList

func (l *ChainService) GetList(chain *entity.Chain, page, size int) (bool, []*entity.Chain, int64)

func (*ChainService) ReleaseChain

func (l *ChainService) ReleaseChain(chain *entity.Chain) (bool, string)

func (*ChainService) RunChain

func (l *ChainService) RunChain(chain *entity.Chain) (bool, string)

func (*ChainService) StopChain

func (l *ChainService) StopChain(chain *entity.Chain) (bool, string)

func (*ChainService) Update

func (l *ChainService) Update(chain *entity.Chain) (bool, string)

func (*ChainService) UpdateStatus

func (l *ChainService) UpdateStatus(chain *entity.Chain) (bool, string)

type ChaincodeService

type ChaincodeService struct {
	DbEngine      *xorm.Engine
	FabircService *FabricService
}

func NewChaincodeService

func NewChaincodeService(engine *xorm.Engine, fabircService *FabricService) *ChaincodeService

func (*ChaincodeService) Add

func (l *ChaincodeService) Add(cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) AddChaincode

func (l *ChaincodeService) AddChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) Delete

func (l *ChaincodeService) Delete(id int) (bool, string)

func (*ChaincodeService) DeployChaincode

func (l *ChaincodeService) DeployChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) GetAllList

func (l *ChaincodeService) GetAllList(chainId int) (bool, []*entity.Chaincode)

func (*ChaincodeService) GetByChaincode

func (l *ChaincodeService) GetByChaincode(cc *entity.Chaincode) (bool, *entity.Chaincode)

func (*ChaincodeService) GetList

func (l *ChaincodeService) GetList(cc *entity.Chaincode, page, size int) (bool, []*entity.Chaincode, int64)

func (*ChaincodeService) InvokeChaincode

func (l *ChaincodeService) InvokeChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) QueryChaincode

func (l *ChaincodeService) QueryChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) Update

func (l *ChaincodeService) Update(cc *entity.Chaincode) (bool, string)

func (*ChaincodeService) UpgradeChaincode

func (l *ChaincodeService) UpgradeChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)

type ChannelService

type ChannelService struct {
	DbEngine      *xorm.Engine
	FabircService *FabricService
}

func NewChannelService

func NewChannelService(engine *xorm.Engine, fabircService *FabricService) *ChannelService

func (*ChannelService) Add

func (l *ChannelService) Add(channel *entity.Channel) (bool, string)

func (*ChannelService) AddChannel

func (l *ChannelService) AddChannel(chain *entity.Chain, channel *entity.Channel) (bool, string)

func (*ChannelService) Delete

func (l *ChannelService) Delete(id int) (bool, string)

func (*ChannelService) GetAllList

func (l *ChannelService) GetAllList(chainId int) (bool, []*entity.Channel)

func (*ChannelService) GetByChannel

func (l *ChannelService) GetByChannel(channel *entity.Channel) (bool, *entity.Channel)

func (*ChannelService) GetList

func (l *ChannelService) GetList(channel *entity.Channel, page, size int) (bool, []*entity.Channel)

func (*ChannelService) Update

func (l *ChannelService) Update(channel *entity.Channel) (bool, string)

type DashboardService

type DashboardService struct {
	DbEngine *xorm.Engine
}

func NewDashboardService

func NewDashboardService(engine *xorm.Engine) *DashboardService

func (*DashboardService) Counts

func (d *DashboardService) Counts(userAccount string) (bool, *model.Dashboard)

func (*DashboardService) SevenDays

func (d *DashboardService) SevenDays(userAccount string, start, end int) (bool, map[string][]map[string]string)

type FabricService

type FabricService struct {
}

func NewFabricService

func NewFabricService() *FabricService

func (FabricService) BuildChaincode

func (g FabricService) BuildChaincode(channel entity.FabricChannel) []byte

func (FabricService) DefChain

func (g FabricService) DefChain(chain entity.FabricChain) []byte

func (FabricService) DefChannel

func (g FabricService) DefChannel(chain entity.FabricChain) []byte

func (FabricService) DeployK8sData

func (g FabricService) DeployK8sData(chain entity.FabricChain) []byte

func (FabricService) DownloadChainArtifacts

func (g FabricService) DownloadChainArtifacts(chain entity.FabricChain) []byte

func (FabricService) DownloadChaincode

func (g FabricService) DownloadChaincode(channel entity.FabricChannel) []byte

func (FabricService) InvokeChaincode

func (g FabricService) InvokeChaincode(channel entity.FabricChannel) []byte

func (FabricService) QueryChaincode

func (g FabricService) QueryChaincode(channel entity.FabricChannel) []byte

func (FabricService) ReleaseChain

func (g FabricService) ReleaseChain(chain entity.FabricChain) []byte

func (FabricService) StopChain

func (g FabricService) StopChain(chain entity.FabricChain) []byte

func (FabricService) UpdateChaincode

func (g FabricService) UpdateChaincode(channel entity.FabricChannel) []byte

func (FabricService) UploadChaincode

func (g FabricService) UploadChaincode(channel entity.FabricChannel) []byte

type RoleService

type RoleService struct {
	DbEngine *xorm.Engine
}

func NewRoleService

func NewRoleService(engine *xorm.Engine) *RoleService

func (*RoleService) Add

func (l *RoleService) Add(role *entity.Role) (bool, string)

func (*RoleService) Delete

func (l *RoleService) Delete(key string) (bool, string)

func (*RoleService) GetAll

func (l *RoleService) GetAll() (bool, []*entity.Role)

func (*RoleService) GetByRole

func (l *RoleService) GetByRole(role *entity.Role) (bool, *entity.Role)

func (*RoleService) GetList

func (l *RoleService) GetList(role *entity.Role, page, size int) (bool, []*entity.Role, int64)

func (*RoleService) Update

func (l *RoleService) Update(role *entity.Role) (bool, string)

type UserService

type UserService struct {
	DbEngine *xorm.Engine
}

func NewUserService

func NewUserService(engine *xorm.Engine) *UserService

func (*UserService) Add

func (l *UserService) Add(user *entity.User) (bool, string)

func (*UserService) AddAuth

func (l *UserService) AddAuth(ur *entity.UserRole) (bool, string)

func (*UserService) CheckToken

func (l *UserService) CheckToken(token string, user *entity.User) (*entity.UserInfo, error)

func (*UserService) DelAuth

func (l *UserService) DelAuth(ur *entity.UserRole) (bool, string)

func (*UserService) Delete

func (l *UserService) Delete(id int) (bool, string)

func (*UserService) GetByUser

func (l *UserService) GetByUser(user *entity.User) (bool, *entity.User)

func (*UserService) GetList

func (l *UserService) GetList(user *entity.User, page, size int) (bool, []entity.UserDetail, int64)

func (*UserService) GetToken

func (l *UserService) GetToken(user *entity.User) *entity.JwtToken

func (*UserService) HasAdminRole

func (l *UserService) HasAdminRole(account string) bool

func (*UserService) Update

func (l *UserService) Update(user *entity.User) (bool, string)

Jump to

Keyboard shortcuts

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