Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(repository Repository, client client.Client, config core.Config) core.DomainService
NewService creates a new host service
Types ¶
type Handler ¶
Service is the domain service interface
func NewHandler ¶
func NewHandler(service core.DomainService) Handler
NewHandler creates a new handler
type Repository ¶
type Repository interface { GetByFQDN(ctx context.Context, key string) (core.Domain, error) GetByCCID(ctx context.Context, ccid string) (core.Domain, error) GetByCSID(ctx context.Context, ccid string) (core.Domain, error) Upsert(ctx context.Context, host core.Domain) (core.Domain, error) GetList(ctx context.Context) ([]core.Domain, error) Delete(ctx context.Context, id string) error UpdateScrapeTime(ctx context.Context, id string, scrapeTime time.Time) error Update(ctx context.Context, host core.Domain) error }
Repository is the interface for host repository
func NewRepository ¶
func NewRepository(db *gorm.DB) Repository
NewRepository creates a new host repository
Click to show internal directories.
Click to hide internal directories.