Documentation ¶
Index ¶
Constants ¶
View Source
const (
CountUserCacheKey = "count_user"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentRepo ¶
type ComponentRepo interface { Get(ctx context.Context, id string) (*domain.Component, error) Create(ctx context.Context, component *domain.Component) (string, error) Update(ctx context.Context, id string, component *domain.Component) error Query(ctx context.Context, filter *domain.ComponentFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.Component, int32, error) QueryDependency(ctx context.Context, id string, filter *domain.ComponentFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.Component, int32, error) QueryDependents(ctx context.Context, id string, filter *domain.ComponentFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.Component, int32, error) QueryTags(ctx context.Context) ([]string, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(config *config.Server, logger *zap.Logger, componentRepo ComponentRepo, transaction Transaction, userRepo UserRepo, teamRepo TeamRepo, ) (*Service, error)
func (*Service) CreateComponent ¶
func (*Service) CreateUser ¶
type TeamRepo ¶
type TeamRepo interface { Create(ctx context.Context, team *domain.Team) (string, error) Get(ctx context.Context, id string) (*domain.Team, error) Delete(ctx context.Context, id string) error Update(ctx context.Context, id string, team *domain.Team) error Query(ctx context.Context, filter *domain.TeamFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.Team, int32, error) QueryMember(ctx context.Context, id string, filter *domain.UserFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.User, int32, error) }
type Transaction ¶
type UserRepo ¶
type UserRepo interface { Query(ctx context.Context, filter *domain.UserFilter, page *domain.PageQuery, sort []*domain.SortQuery) ([]*domain.User, int32, error) Create(ctx context.Context, user *domain.User) (*domain.User, error) Get(ctx context.Context, id string) (*domain.User, error) Delete(ctx context.Context, id string) error Update(ctx context.Context, id string, user *domain.User) error GetByGithubID(ctx context.Context, githubID string) (*domain.User, error) Count(ctx context.Context) (int32, error) }
Click to show internal directories.
Click to hide internal directories.