Versions in this module Expand all Collapse all v0 v0.0.1 Oct 29, 2014 Changes in this version + const StatsGranularity + func NewServer(db *mgo.Database, es *elasticsearch.Index, config ServerParams, ...) (http.Handler, error) + func NewZipFile(f *zip.File) (mongodoc.ZipFile, error) + func ReaderAtSeeker(r io.ReadSeeker) io.ReaderAt + func ZipFileReader(zipr io.ReadSeeker, f mongodoc.ZipFile) (io.Reader, error) + type AddParams struct + BlobHash string + BlobName string + BlobSize int64 + Contents map[mongodoc.FileId]mongodoc.ZipFile + URL *charm.Reference + type Counter struct + Count int64 + Key []string + Prefix bool + Time time.Time + type CounterRequest struct + By CounterRequestBy + Key []string + List bool + Prefix bool + Start time.Time + Stop time.Time + type CounterRequestBy int + const ByAll + const ByDay + const ByWeek + type NewAPIHandlerFunc func(*Store, ServerParams) http.Handler + type SearchParams struct + AutoComplete bool + Filters map[string][]string + Include []string + Limit int + Skip int + Text string + type SearchResult struct + Results []*charm.Reference + SearchTime time.Duration + Total int + type ServerParams struct + AuthPassword string + AuthUsername string + type Store struct + BlobStore *blobstore.Store + DB StoreDatabase + ES *StoreElasticSearch + func NewStore(db *mgo.Database, ses *StoreElasticSearch) (*Store, error) + func (s *Store) AddBundle(b charm.Bundle, p AddParams) error + func (s *Store) AddBundleWithArchive(url *charm.Reference, b charm.Bundle) error + func (s *Store) AddCharm(c charm.Charm, p AddParams) (err error) + func (s *Store) AddCharmWithArchive(url *charm.Reference, ch charm.Charm) error + func (s *Store) BlobNameAndHash(id *charm.Reference) (name, hash string, err error) + func (s *Store) Counters(req *CounterRequest) ([]Counter, error) + func (s *Store) ExpandURL(url *charm.Reference) ([]*charm.Reference, error) + func (s *Store) FindEntities(url *charm.Reference, fields ...string) ([]*mongodoc.Entity, error) + func (s *Store) FindEntity(url *charm.Reference, fields ...string) (*mongodoc.Entity, error) + func (s *Store) IncCounter(key []string) error + func (s *Store) IncCounterAsync(key []string) + func (s *Store) IncCounterAtTime(key []string, t time.Time) error + func (s *Store) OpenBlob(id *charm.Reference) (r blobstore.ReadSeekCloser, size int64, hash string, err error) + func (s *Store) OpenCachedBlobFile(entity *mongodoc.Entity, fileId mongodoc.FileId, isFile func(f *zip.File) bool) (_ io.ReadCloser, err error) + func (store *Store) ExportToElasticSearch() error + func (store *Store) Search(sp SearchParams) (SearchResult, error) + type StoreDatabase struct + func (s StoreDatabase) Close() + func (s StoreDatabase) Collections() []*mgo.Collection + func (s StoreDatabase) Copy() StoreDatabase + func (s StoreDatabase) Entities() *mgo.Collection + func (s StoreDatabase) StatCounters() *mgo.Collection + func (s StoreDatabase) StatTokens() *mgo.Collection + type StoreElasticSearch struct