Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ApplyStatusRefuse 拒绝 ApplyStatusRefuse = iota // ApplyStatusReview 审核中 ApplyStatusReview // ApplyStatusSubscribe 已订阅 ApplyStatusSubscribe // ApplyStatusUnsubscribe 已退订 ApplyStatusUnsubscribe // ApplyStatusCancel 取消申请 ApplyStatusCancel )
View Source
const ( // FromUser 用户添加 FromUser = iota // FromSubscribe 订阅 FromSubscribe )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Apply ¶
type Apply struct { Id string Service string Team string Application string ApplyTeam string Applier string ApplyAt time.Time Approver string ApproveAt time.Time Status int Opinion string Reason string }
func FromApplyEntity ¶
type CreateApply ¶
type CreateSubscribe ¶
type ISubscribeApplyService ¶
type ISubscribeApplyService interface { universally.IServiceGet[Apply] universally.IServiceDelete universally.IServiceCreate[CreateApply] universally.IServiceEdit[EditApply] GetApply(ctx context.Context, serviceId string, appId string) (*Apply, error) ListByStatus(ctx context.Context, pid string, status ...int) ([]*Apply, error) Revoke(ctx context.Context, service string, application string) error RevokeById(ctx context.Context, id string) error }
type ISubscribeService ¶
type ISubscribeService interface { universally.IServiceGet[Subscribe] universally.IServiceDelete universally.IServiceCreate[CreateSubscribe] universally.IServiceEdit[UpdateSubscribe] CountMapByService(ctx context.Context, status int, service ...string) (map[string]int64, error) DeleteByApplication(ctx context.Context, service string, application string) error ListByApplication(ctx context.Context, service string, application ...string) ([]*Subscribe, error) ListByServices(ctx context.Context, serviceIds ...string) ([]*Subscribe, error) GetByServiceAndApplication(ctx context.Context, serviceId string, applicationId string) (*Subscribe, error) MySubscribeServices(ctx context.Context, application string, serviceIDs []string) ([]*Subscribe, error) UpdateSubscribeStatus(ctx context.Context, application string, service string, status int) error ListBySubscribeStatus(ctx context.Context, projectId string, status int) ([]*Subscribe, error) SubscribersByProject(ctx context.Context, projectIds ...string) ([]*Subscribe, error) Subscribers(ctx context.Context, project string, status int) ([]*Subscribe, error) SubscriptionsByApplication(ctx context.Context, applicationIds ...string) ([]*Subscribe, error) }
type Subscribe ¶
type Subscribe struct { Id string Service string // 订阅方相关 Application string From int Applier string ApplyStatus int CreateAt time.Time }
func FromEntity ¶
type UpdateSubscribe ¶
type UpdateSubscribe struct {
ApplyStatus *int
}
Click to show internal directories.
Click to hide internal directories.