Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostRepository ¶
type HostRepository interface { Create(ctx context.Context, host *entity.Host) (*entity.Host, error) Get(ctx context.Context, id string) (*entity.Host, error) Update(ctx context.Context, host *entity.Host) (*entity.Host, error) Delete(ctx context.Context, id string) error Find(ctx context.Context, options *entity.HostFindOptions) ([]*entity.Host, error) GetHostByEnrollCode(ctx context.Context, code string) (*entity.Host, error) // GetEnrollHost 获取主机的注册信息 GetEnrollHost(ctx context.Context, getEnrollHost *entity.GetEnrollHost) (*entity.EnrollHost, error) // EnrollHost 注册主机 EnrollHost(ctx context.Context, enrollHost *entity.EnrollHost) error // HostOnline 主机上线 HostOnline(ctx context.Context, hostOnline *entity.HostOnline) (*entity.HostOnline, error) // HostOffline 主机下线 HostOffline(ctx context.Context, hostOffline *entity.HostOffline) (*entity.HostOffline, error) }
HostRepository 定义了对主机数据的存储和操作接口
type HostRuleRepository ¶
type RuleRepository ¶
type RuleRepository interface { Create(ctx context.Context, userID string, rule *entity.Rule) (*entity.Rule, error) Get(ctx context.Context, userID, id string) (*entity.Rule, error) Gets(ctx context.Context, userID string, id []string) ([]*entity.Rule, error) Update(ctx context.Context, userID string, rule *entity.Rule) error Delete(ctx context.Context, id string) error Find(ctx context.Context, userID string, options *entity.RuleFindOptions) ([]*entity.Rule, error) }
Click to show internal directories.
Click to hide internal directories.