Documentation ¶
Index ¶
- type APIRootService
- func (s APIRootService) APIRoot(ctx context.Context, path string) (cabby.APIRoot, error)
- func (s APIRootService) APIRoots(ctx context.Context) ([]cabby.APIRoot, error)
- func (s APIRootService) CreateAPIRoot(ctx context.Context, a cabby.APIRoot) error
- func (s APIRootService) DeleteAPIRoot(ctx context.Context, id string) error
- func (s APIRootService) UpdateAPIRoot(ctx context.Context, a cabby.APIRoot) error
- type CollectionService
- func (s CollectionService) Collection(ctx context.Context, apiRootPath, collectionID string) (cabby.Collection, error)
- func (s CollectionService) Collections(ctx context.Context, apiRootPath string, cr *cabby.Range) (cabby.Collections, error)
- func (s CollectionService) CollectionsInAPIRoot(ctx context.Context, apiRootPath string) (cabby.CollectionsInAPIRoot, error)
- func (s CollectionService) CreateCollection(ctx context.Context, c cabby.Collection) error
- func (s CollectionService) DeleteCollection(ctx context.Context, id string) error
- func (s CollectionService) UpdateCollection(ctx context.Context, c cabby.Collection) error
- type DataStore
- func (s *DataStore) APIRootService() cabby.APIRootService
- func (s *DataStore) Close()
- func (s *DataStore) CollectionService() cabby.CollectionService
- func (s *DataStore) DiscoveryService() cabby.DiscoveryService
- func (s *DataStore) ManifestService() cabby.ManifestService
- func (s *DataStore) ObjectService() cabby.ObjectService
- func (s *DataStore) Open() (err error)
- func (s *DataStore) StatusService() cabby.StatusService
- func (s *DataStore) UserService() cabby.UserService
- type DiscoveryService
- func (s DiscoveryService) CreateDiscovery(ctx context.Context, d cabby.Discovery) error
- func (s DiscoveryService) DeleteDiscovery(ctx context.Context) error
- func (s DiscoveryService) Discovery(ctx context.Context) (cabby.Discovery, error)
- func (s DiscoveryService) UpdateDiscovery(ctx context.Context, d cabby.Discovery) error
- type Filter
- type ManifestService
- type ObjectService
- func (s ObjectService) CreateBundle(ctx context.Context, b stones.Bundle, collectionID string, st cabby.Status, ...)
- func (s ObjectService) CreateObject(ctx context.Context, object cabby.Object) error
- func (s ObjectService) Object(ctx context.Context, collectionID, objectID string, f cabby.Filter) ([]cabby.Object, error)
- func (s ObjectService) Objects(ctx context.Context, collectionID string, cr *cabby.Range, f cabby.Filter) ([]cabby.Object, error)
- type Range
- type StatusService
- type UserService
- func (s UserService) CreateUser(ctx context.Context, user cabby.User, password string) error
- func (s UserService) CreateUserCollection(ctx context.Context, user string, ca cabby.CollectionAccess) error
- func (s UserService) DeleteUser(ctx context.Context, user string) error
- func (s UserService) DeleteUserCollection(ctx context.Context, user, id string) error
- func (s UserService) UpdateUser(ctx context.Context, user cabby.User) error
- func (s UserService) UpdateUserCollection(ctx context.Context, user string, ca cabby.CollectionAccess) error
- func (s UserService) User(ctx context.Context, user, password string) (cabby.User, error)
- func (s UserService) UserCollections(ctx context.Context, user string) (cabby.UserCollectionList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRootService ¶
APIRootService implements a SQLite version of the APIRootService interface
func (APIRootService) CreateAPIRoot ¶
CreateAPIRoot creates a user in the data store
func (APIRootService) DeleteAPIRoot ¶
func (s APIRootService) DeleteAPIRoot(ctx context.Context, id string) error
DeleteAPIRoot creates a user in the data store
func (APIRootService) UpdateAPIRoot ¶
UpdateAPIRoot creates a user in the data store
type CollectionService ¶
CollectionService implements a SQLite version of the CollectionService interface
func (CollectionService) Collection ¶
func (s CollectionService) Collection(ctx context.Context, apiRootPath, collectionID string) (cabby.Collection, error)
Collection will read from the data store and return the resource
func (CollectionService) Collections ¶
func (s CollectionService) Collections(ctx context.Context, apiRootPath string, cr *cabby.Range) (cabby.Collections, error)
Collections will read from the data store and return the resource
func (CollectionService) CollectionsInAPIRoot ¶
func (s CollectionService) CollectionsInAPIRoot(ctx context.Context, apiRootPath string) (cabby.CollectionsInAPIRoot, error)
CollectionsInAPIRoot return collections in a given api root
func (CollectionService) CreateCollection ¶
func (s CollectionService) CreateCollection(ctx context.Context, c cabby.Collection) error
CreateCollection creates a user in the data store
func (CollectionService) DeleteCollection ¶
func (s CollectionService) DeleteCollection(ctx context.Context, id string) error
DeleteCollection creates a user in the data store
func (CollectionService) UpdateCollection ¶
func (s CollectionService) UpdateCollection(ctx context.Context, c cabby.Collection) error
UpdateCollection creates a user in the data store
type DataStore ¶
DataStore represents a SQLite database
func NewDataStore ¶
NewDataStore returns a sqliteDB
func (*DataStore) APIRootService ¶
func (s *DataStore) APIRootService() cabby.APIRootService
APIRootService returns a service for api root resources
func (*DataStore) CollectionService ¶
func (s *DataStore) CollectionService() cabby.CollectionService
CollectionService returns a service for collection resources
func (*DataStore) DiscoveryService ¶
func (s *DataStore) DiscoveryService() cabby.DiscoveryService
DiscoveryService returns a service for discovery resources
func (*DataStore) ManifestService ¶
func (s *DataStore) ManifestService() cabby.ManifestService
ManifestService returns a service for object resources
func (*DataStore) ObjectService ¶
func (s *DataStore) ObjectService() cabby.ObjectService
ObjectService returns a service for object resources
func (*DataStore) StatusService ¶
func (s *DataStore) StatusService() cabby.StatusService
StatusService returns service for status resources
func (*DataStore) UserService ¶
func (s *DataStore) UserService() cabby.UserService
UserService returns a service for user resources
type DiscoveryService ¶
DiscoveryService implements a SQLite version of the DiscoveryService interface
func (DiscoveryService) CreateDiscovery ¶
CreateDiscovery creates a user in the data store
func (DiscoveryService) DeleteDiscovery ¶
func (s DiscoveryService) DeleteDiscovery(ctx context.Context) error
DeleteDiscovery creates a user in the data store
func (DiscoveryService) UpdateDiscovery ¶
UpdateDiscovery creates a user in the data store
type Filter ¶
Filter implementation for SQLite
func (*Filter) QueryString ¶
QueryString will convert a filter into a query string for a service query
type ManifestService ¶
ManifestService implements a SQLite version of the ManifestService interface
type ObjectService ¶
ObjectService implements a SQLite version of the ObjectService interface
func (ObjectService) CreateBundle ¶
func (s ObjectService) CreateBundle(ctx context.Context, b stones.Bundle, collectionID string, st cabby.Status, ss cabby.StatusService)
CreateBundle will read from the data store and return the resource
func (ObjectService) CreateObject ¶
CreateObject will read from the data store and return the resource
type Range ¶
Range implementation for SQLite
func (*Range) QueryString ¶
QueryString returns sql for paginating a range of data
type StatusService ¶
StatusService implements a SQLite version of the StatusService interface
func (StatusService) CreateStatus ¶
CreateStatus will read from the data store and return the resource
func (StatusService) UpdateStatus ¶
UpdateStatus will read from the data store and return the resource
type UserService ¶
UserService implements a SQLite version of the servce
func (UserService) CreateUser ¶
CreateUser creates a user in the data store
func (UserService) CreateUserCollection ¶
func (s UserService) CreateUserCollection(ctx context.Context, user string, ca cabby.CollectionAccess) error
CreateUserCollection creates an association of a user to a collection
func (UserService) DeleteUser ¶
func (s UserService) DeleteUser(ctx context.Context, user string) error
DeleteUser creates a user in the data store
func (UserService) DeleteUserCollection ¶
func (s UserService) DeleteUserCollection(ctx context.Context, user, id string) error
DeleteUserCollection deletes a collection from a user
func (UserService) UpdateUser ¶
UpdateUser creates a user in the data store
func (UserService) UpdateUserCollection ¶
func (s UserService) UpdateUserCollection(ctx context.Context, user string, ca cabby.CollectionAccess) error
UpdateUserCollection update a users access to a specfific collection
func (UserService) User ¶
User will read from the data store and populate the result with a resource
func (UserService) UserCollections ¶
func (s UserService) UserCollections(ctx context.Context, user string) (cabby.UserCollectionList, error)
UserCollections will read from the data store and populate the result with a resource