Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClosed = errors.New("service closed") ErrBizTagNotFound = errors.New("biztag not found") )
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { List(ctx context.Context) ([]*Segment, error) Get(ctx context.Context, biztag string) (*Segment, error) UpdateMaxID(ctx context.Context, biztag string) (*Segment, error) UpdateMaxIDWithStep(ctx context.Context, biztag string, step int32) (*Segment, error) ListBizTags(ctx context.Context) ([]string, error) }
func NewDefaultRepository ¶
func NewDefaultRepository(db *sql.DB) (Repository, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo Repository, logger log.Logger) *Service
Click to show internal directories.
Click to hide internal directories.