package controller

import (
	"git.schreifuchs.ch/schreifuchs/warehouse/api"
	"git.schreifuchs.ch/schreifuchs/warehouse/model"
)

// Implement the interface
type Controller struct {
	db database
}

func New(db database) *Controller {
	return &Controller{
		db: db,
	}
}

type database interface {
	InsertBucket(bucket *model.Bucket) error
	FindApiBuckets(limit, offset int) (buckets []api.Bucket, err error)
	FindBucketIdByName(name string) (id uint, err error)
	DeleteBucketByName(name string) error
}
