MSP-5186 Interfaces working
This commit is contained in:
1 parent
f095d338cf
commit
84ebd8b5a9
8 files changed
+126
-150
No files matched your search
@@ -0,0 +1,38 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"isp-system-service/entity"
|
||||
)
|
||||
|
||||
type TokenRepo interface {
|
||||
GetTokenByAppIdList(ctx context.Context, appIdList []int) ([]entity.Token, error)
|
||||
}
|
||||
|
||||
type DomainRepo interface {
|
||||
GetDomainById(ctx context.Context, id int) (*entity.Domain, error)
|
||||
GetDomainBySystemId(ctx context.Context, systemId int) ([]entity.Domain, error)
|
||||
GetDomainByNameAndSystemId(ctx context.Context, name string, systemId int) (*entity.Domain, error)
|
||||
CreateDomain(ctx context.Context, name string, desc string, systemId int) (*entity.Domain, error)
|
||||
UpdateDomain(ctx context.Context, id int, name string, description string) (*entity.Domain, error)
|
||||
DeleteDomain(ctx context.Context, idList []int) (int, error)
|
||||
}
|
||||
|
||||
type ApplicationRepo interface {
|
||||
GetApplicationById(ctx context.Context, id int) (*entity.Application, error)
|
||||
GetApplicationByIdList(ctx context.Context, idList []int) ([]entity.Application, error)
|
||||
GetApplicationByServiceIdList(ctx context.Context, serviceIdList []int) ([]entity.Application, error)
|
||||
GetApplicationByNameAndServiceId(ctx context.Context, name string, serviceId int) (*entity.Application, error)
|
||||
CreateApplication(ctx context.Context, name string, desc string, serviceId int, appType string) (*entity.Application, error)
|
||||
UpdateApplication(ctx context.Context, id int, name string, description string) (*entity.Application, error)
|
||||
}
|
||||
|
||||
type ServiceRepo interface {
|
||||
GetServiceById(ctx context.Context, id int) (*entity.Service, error)
|
||||
GetServiceByIdList(ctx context.Context, idList []int) ([]entity.Service, error)
|
||||
GetServiceByDomainId(ctx context.Context, domainIdList []int) ([]entity.Service, error)
|
||||
GetServiceByNameAndDomainId(ctx context.Context, name string, domainId int) (*entity.Service, error)
|
||||
CreateService(ctx context.Context, name string, desc string, domainId int) (*entity.Service, error)
|
||||
UpdateService(ctx context.Context, id int, name string, description string) (*entity.Service, error)
|
||||
DeleteService(ctx context.Context, idList []int) (int, error)
|
||||
}
|
||||
Reference in new issue
Block a user