Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_LIST_SIZE = 65500
~65500 is the maximum number of parameters that can be provided to a postgres WHERE IN clause Use it as a sane max
Variables ¶
View Source
var DisableAdvisoryLock = false
This flag will only be used in integration test to prove that the advisory lock works
View Source
var (
SearchDisallowedFields = map[string]map[string]string{}
)
Functions ¶
This section is empty.
Types ¶
type DinosaurService ¶
type DinosaurService interface { Get(ctx context.Context, id string) (*api.Dinosaur, *errors.ServiceError) Create(ctx context.Context, dinosaur *api.Dinosaur) (*api.Dinosaur, *errors.ServiceError) Replace(ctx context.Context, dinosaur *api.Dinosaur) (*api.Dinosaur, *errors.ServiceError) Delete(ctx context.Context, id string) *errors.ServiceError All(ctx context.Context) (api.DinosaurList, *errors.ServiceError) FindBySpecies(ctx context.Context, species string) (api.DinosaurList, *errors.ServiceError) FindByIDs(ctx context.Context, ids []string) (api.DinosaurList, *errors.ServiceError) // idempotent functions for the control plane, but can also be called synchronously by any actor OnUpsert(ctx context.Context, id string) error OnDelete(ctx context.Context, id string) error }
func NewDinosaurService ¶
func NewDinosaurService(lockFactory db.LockFactory, dinosaurDao dao.DinosaurDao, events EventService) DinosaurService
type EventService ¶
type EventService interface { Get(ctx context.Context, id string) (*api.Event, *errors.ServiceError) Create(ctx context.Context, event *api.Event) (*api.Event, *errors.ServiceError) Replace(ctx context.Context, event *api.Event) (*api.Event, *errors.ServiceError) Delete(ctx context.Context, id string) *errors.ServiceError All(ctx context.Context) (api.EventList, *errors.ServiceError) FindByIDs(ctx context.Context, ids []string) (api.EventList, *errors.ServiceError) }
func NewEventService ¶
func NewEventService(eventDao dao.EventDao) EventService
type GenericService ¶
type GenericService interface {
List(ctx context.Context, username string, args *ListArguments, resourceList interface{}) (*api.PagingMeta, *errors.ServiceError)
}
func NewGenericService ¶
func NewGenericService(genericDao dao.GenericDao) GenericService
type ListArguments ¶
type ListArguments struct { Page int Size int64 Preloads []string Search string OrderBy []string Fields []string }
ListArguments are arguments relevant for listing objects. This struct is common to all service List funcs in this package
func NewListArguments ¶
func NewListArguments(params url.Values) *ListArguments
Create ListArguments from url query parameters with sane defaults
Click to show internal directories.
Click to hide internal directories.