Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidBackend = errors.New("invalid backend data")
Functions ¶
func Validate ¶
func Validate(backend *runtimetypes.Backend) error
Validate applies the field rules Create and Update enforce, without the one-backend-per-type-and-URL rule. Callers that deliberately allow several connections to one endpoint (each with its own credential) use it before writing through the store.
Types ¶
type Service ¶
type Service interface {
Create(ctx context.Context, backend *runtimetypes.Backend) error
Get(ctx context.Context, id string) (*runtimetypes.Backend, error)
Update(ctx context.Context, backend *runtimetypes.Backend) error
Delete(ctx context.Context, id string) error
List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Backend, error)
}
func WithActivityTracker ¶
func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service