Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrorCodeConflict = 409 ErrorCodeNotFound = 404 )
Variables ¶
This section is empty.
Functions ¶
func IsKeyConflict ¶
IsKeyConflict returns true if the error code is ErrorCodeConflict = 409.
func IsKeyNotFound ¶
IsKeyNotFound returns true if the error code is ErrorCodeNotFound.
Types ¶
type DAO ¶
type DAO interface {
io.Closer
Init() error
IsCaseSensitive() bool
Create(entity modelAPI.Entity) error
Upsert(entity modelAPI.Entity) error
// Get will find a unique object. It will depend on the implementation to generate the key based on the kind and the metadata.
// entity is the object that will be used by the method to set the value returned by the database.
Get(kind modelV1.Kind, metadata modelAPI.Metadata, entity modelAPI.Entity) error
// Query will find a list of resource that is matching the query passed in parameter. The list found will be set in slice.
// slice is an interface for casting simplification. But slice must be a pointer to a slice of modelAPI.Metadata
Query(query Query, slice interface{}) error
RawQuery(query Query) ([]json.RawMessage, error)
RawMetadataQuery(query Query, kind modelV1.Kind) ([]json.RawMessage, error)
Delete(kind modelV1.Kind, metadata modelAPI.Metadata) error
DeleteByQuery(query Query) error
HealthCheck() bool
GetLatestUpdateTime(kind []modelV1.Kind) (*string, error)
}
Click to show internal directories.
Click to hide internal directories.