Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type MongoDb
- func (m MongoDb) Close(c *mgo.Collection)
- func (m MongoDb) Connect(document string) *mgo.Collection
- func (m MongoDb) DeleteStorageProfile(ctxt string, name string) error
- func (m MongoDb) DeleteUser(username string) error
- func (m MongoDb) InitDb() error
- func (m MongoDb) InitStorageProfile(ctxt string) error
- func (m MongoDb) InitUser() error
- func (m MongoDb) MailNotifier(ctxt string) (models.MailNotifier, error)
- func (m MongoDb) MailNotifierInterface() dao.MailNotifierInterface
- func (m MongoDb) SaveMailNotifier(ctxt string, notifier models.MailNotifier) error
- func (m MongoDb) SaveStorageProfile(ctxt string, s models.StorageProfile) error
- func (m MongoDb) SaveUser(user models.User) error
- func (m MongoDb) StorageProfile(ctxt string, name string) (sProfile models.StorageProfile, e error)
- func (m MongoDb) StorageProfileInterface() dao.StorageProfileInterface
- func (m MongoDb) StorageProfiles(ctxt string, filter interface{}, ops models.QueryOps) (sProfiles []models.StorageProfile, e error)
- func (m MongoDb) User(username string) (user models.User, e error)
- func (m MongoDb) UserInterface() dao.UserInterface
- func (m MongoDb) Users(filter interface{}) (us []models.User, e error)
Constants ¶
const (
ProviderName = "mongodbprovider"
)
Variables ¶
var (
ErrMissingNotifier = mkmgoerror("can't find Mail Notifier")
)
var (
ErrMissingUser = mkmgoerror("can't find user")
)
Functions ¶
This section is empty.
Types ¶
type MongoDb ¶
type MongoDb struct {
Session *mgo.Session
}
func (MongoDb) DeleteStorageProfile ¶
func (MongoDb) DeleteUser ¶
DeleteUser removes a user. ErrNotFound is returned if the user isn't found.
func (MongoDb) InitStorageProfile ¶
func (MongoDb) MailNotifier ¶
func (m MongoDb) MailNotifier(ctxt string) (models.MailNotifier, error)
User returns the Mail notifier.
func (MongoDb) MailNotifierInterface ¶
func (m MongoDb) MailNotifierInterface() dao.MailNotifierInterface
func (MongoDb) SaveMailNotifier ¶
func (m MongoDb) SaveMailNotifier(ctxt string, notifier models.MailNotifier) error
Save mail notifier adds a new mail notifier, it replaces the existing one if there is already a notifier available.
func (MongoDb) SaveStorageProfile ¶
func (m MongoDb) SaveStorageProfile(ctxt string, s models.StorageProfile) error
func (MongoDb) StorageProfile ¶
func (MongoDb) StorageProfileInterface ¶
func (m MongoDb) StorageProfileInterface() dao.StorageProfileInterface
func (MongoDb) StorageProfiles ¶
func (MongoDb) User ¶
User returns the user with the given username. Error is set to ErrMissingUser if user is not found.
func (MongoDb) UserInterface ¶
func (m MongoDb) UserInterface() dao.UserInterface