Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataStore ¶
type MetadataStore struct {
// contains filtered or unexported fields
}
MetadataStore represents a Mongo backed metadata store.
func NewStorage ¶
func NewStorage(url, dbName string) *MetadataStore
NewStorage returns an unconnected Mongo backed storage that satisfies the Storage interface. You must call Connect() on the returned store before using it.
func (*MetadataStore) Connect ¶
func (m *MetadataStore) Connect() error
Connect conntect the the newly created mongo backend.
func (*MetadataStore) Get ¶
func (s *MetadataStore) Get(module string) (string, error)
Get retrieves the cdn base URL for a module
func (*MetadataStore) Save ¶
func (s *MetadataStore) Save(module, redirectURL string) error
Save stores a module in mongo storage.
Click to show internal directories.
Click to hide internal directories.