Documentation ¶
Index ¶
- Constants
- type ChainService
- func (l *ChainService) Add(chain *entity.Chain) (bool, string)
- func (l *ChainService) BuildChain(chain *entity.Chain) (bool, string)
- func (l *ChainService) Delete(id int) (bool, string)
- func (l *ChainService) DownloadChainArtifacts(chain *entity.Chain) (io.Reader, int64, string)
- func (l *ChainService) GetByChain(chain *entity.Chain) (bool, *entity.Chain)
- func (l *ChainService) GetList(chain *entity.Chain, page, size int) (bool, []*entity.Chain, int64)
- func (l *ChainService) ReleaseChain(chain *entity.Chain) (bool, string)
- func (l *ChainService) RunChain(chain *entity.Chain) (bool, string)
- func (l *ChainService) StopChain(chain *entity.Chain) (bool, string)
- func (l *ChainService) Update(chain *entity.Chain) (bool, string)
- func (l *ChainService) UpdateStatus(chain *entity.Chain) (bool, string)
- type ChaincodeService
- func (l *ChaincodeService) Add(cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) AddChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) Delete(id int) (bool, string)
- func (l *ChaincodeService) DeployChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) GetAllList(chainId int) (bool, []*entity.Chaincode)
- func (l *ChaincodeService) GetByChaincode(cc *entity.Chaincode) (bool, *entity.Chaincode)
- func (l *ChaincodeService) GetList(cc *entity.Chaincode, page, size int) (bool, []*entity.Chaincode, int64)
- func (l *ChaincodeService) InvokeChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) QueryChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) Update(cc *entity.Chaincode) (bool, string)
- func (l *ChaincodeService) UpgradeChaincode(chain *entity.Chain, channel *entity.Channel, cc *entity.Chaincode) (bool, string)
- type ChannelService
- func (l *ChannelService) Add(channel *entity.Channel) (bool, string)
- func (l *ChannelService) AddChannel(chain *entity.Chain, channel *entity.Channel) (bool, string)
- func (l *ChannelService) Delete(id int) (bool, string)
- func (l *ChannelService) GetAllList(chainId int) (bool, []*entity.Channel)
- func (l *ChannelService) GetByChannel(channel *entity.Channel) (bool, *entity.Channel)
- func (l *ChannelService) GetList(channel *entity.Channel, page, size int) (bool, []*entity.Channel)
- func (l *ChannelService) Update(channel *entity.Channel) (bool, string)
- type DashboardService
- type FabricService
- func (g FabricService) BuildChaincode(channel entity.FabricChannel) []byte
- func (g FabricService) DefChain(chain entity.FabricChain) []byte
- func (g FabricService) DefChannel(chain entity.FabricChain) []byte
- func (g FabricService) DeployK8sData(chain entity.FabricChain) []byte
- func (g FabricService) DownloadChainArtifacts(chain entity.FabricChain) []byte
- func (g FabricService) DownloadChaincode(channel entity.FabricChannel) []byte
- func (g FabricService) InvokeChaincode(channel entity.FabricChannel) []byte
- func (g FabricService) QueryChaincode(channel entity.FabricChannel) []byte
- func (g FabricService) ReleaseChain(chain entity.FabricChain) []byte
- func (g FabricService) StopChain(chain entity.FabricChain) []byte
- func (g FabricService) UpdateChaincode(channel entity.FabricChannel) []byte
- func (g FabricService) UploadChaincode(channel entity.FabricChannel) []byte
- type RoleService
- func (l *RoleService) Add(role *entity.Role) (bool, string)
- func (l *RoleService) Delete(key string) (bool, string)
- func (l *RoleService) GetAll() (bool, []*entity.Role)
- func (l *RoleService) GetByRole(role *entity.Role) (bool, *entity.Role)
- func (l *RoleService) GetList(role *entity.Role, page, size int) (bool, []*entity.Role, int64)
- func (l *RoleService) Update(role *entity.Role) (bool, string)
- type UserService
- func (l *UserService) Add(user *entity.User) (bool, string)
- func (l *UserService) AddAuth(ur *entity.UserRole) (bool, string)
- func (l *UserService) CheckToken(token string, user *entity.User) (*entity.UserInfo, error)
- func (l *UserService) DelAuth(ur *entity.UserRole) (bool, string)
- func (l *UserService) Delete(id int) (bool, string)
- func (l *UserService) GetByUser(user *entity.User) (bool, *entity.User)
- func (l *UserService) GetList(user *entity.User, page, size int) (bool, []entity.UserDetail, int64)
- func (l *UserService) GetToken(user *entity.User) *entity.JwtToken
- func (l *UserService) HasAdminRole(account string) bool
- func (l *UserService) Update(user *entity.User) (bool, string)
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) BuildChain ¶
func (l *ChainService) BuildChain(chain *entity.Chain) (bool, string)
func (*ChainService) DownloadChainArtifacts ¶
func (*ChainService) GetByChain ¶
func (*ChainService) ReleaseChain ¶
func (l *ChainService) ReleaseChain(chain *entity.Chain) (bool, string)
func (*ChainService) StopChain ¶
func (l *ChainService) StopChain(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) AddChaincode ¶
func (*ChaincodeService) DeployChaincode ¶
func (*ChaincodeService) GetAllList ¶
func (l *ChaincodeService) GetAllList(chainId int) (bool, []*entity.Chaincode)
func (*ChaincodeService) GetByChaincode ¶
func (*ChaincodeService) InvokeChaincode ¶
func (*ChaincodeService) QueryChaincode ¶
type ChannelService ¶
type ChannelService struct { DbEngine *xorm.Engine FabircService *FabricService }
func NewChannelService ¶
func NewChannelService(engine *xorm.Engine, fabircService *FabricService) *ChannelService
func (*ChannelService) AddChannel ¶
func (*ChannelService) GetAllList ¶
func (l *ChannelService) GetAllList(chainId int) (bool, []*entity.Channel)
func (*ChannelService) GetByChannel ¶
type DashboardService ¶
func NewDashboardService ¶
func NewDashboardService(engine *xorm.Engine) *DashboardService
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 ¶
func NewRoleService ¶
func NewRoleService(engine *xorm.Engine) *RoleService
type UserService ¶
func NewUserService ¶
func NewUserService(engine *xorm.Engine) *UserService
func (*UserService) CheckToken ¶
func (*UserService) GetList ¶
func (l *UserService) GetList(user *entity.User, page, size int) (bool, []entity.UserDetail, int64)
func (*UserService) HasAdminRole ¶
func (l *UserService) HasAdminRole(account string) bool
Click to show internal directories.
Click to hide internal directories.