repository

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAreadyExist is error data is found in datasource when requests to crate
	ErrAreadyExist = repository.ErrAreadyExist
	// ErrNotExist is error data is not found in datasource
	ErrNotExist = repository.ErrNotExist
	// ErrNoPermission ...
	ErrNoPermission = repository.ErrNoPermission
)

Functions

This section is empty.

Types

type Crawler

type Crawler interface {
	Crawl(ctx context.Context) (output []*HolidayEntity, err error)
}

type Creater

type Creater interface {
	Create(ctx context.Context, input *entity.Holiday) (err error)
}

type DateRange

type DateRange struct {
	Gte *string
	Lte *string
}

type DifinitionAllFinder

type DifinitionAllFinder interface {
	FindAllDefinitions(ctx context.Context) (output []*entity.Holiday, err error)
}

type DifinitionFinder

type DifinitionFinder interface {
	FindDefinition(ctx context.Context, id int) (output *entity.Holiday, err error)
}

type HolidayEntity

type HolidayEntity struct {
	Date time.Time
	Name string
}

type Holidays

type Importer

type Importer interface {
	DifinitionAllFinder
	Creater
}

type SearchOption

type SearchOption struct {
	Range  *DateRange
	Limit  int
	Offset int
}

type Searcher

type Searcher interface {
	Search(ctx context.Context, options SearchOption) (output []*entity.Holiday, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL