Documentation ¶
Overview ¶
Copyright 2017 Northern.tech AS
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
- type DataStoreMongo
- func (db *DataStoreMongo) DeleteDeviceAuth(ctx context.Context, id model.AuthID) error
- func (db *DataStoreMongo) DeleteDeviceAuthByDevice(ctx context.Context, id model.DeviceID) error
- func (db *DataStoreMongo) EnsureIndexes(ctx context.Context, s *mgo.Session) error
- func (db *DataStoreMongo) GetDeviceAuth(ctx context.Context, id model.AuthID) (*model.DeviceAuth, error)
- func (db *DataStoreMongo) GetDeviceAuths(ctx context.Context, skip, limit int, filter store.Filter) ([]model.DeviceAuth, error)
- func (db *DataStoreMongo) GetDeviceAuthsByIdentityData(ctx context.Context, idata string) ([]model.DeviceAuth, error)
- func (db *DataStoreMongo) InsertDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
- func (db *DataStoreMongo) Migrate(ctx context.Context, version string) error
- func (db *DataStoreMongo) MigrateTenant(ctx context.Context, version string, tenant string) error
- func (db *DataStoreMongo) PutDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
- func (db *DataStoreMongo) UpdateDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
- func (db *DataStoreMongo) WithAutomigrate() store.DataStore
- type DataStoreMongoConfig
Constants ¶
View Source
const ( DbVersion = "1.1.0" DbName = "deviceadm" DbDevicesColl = "devices" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStoreMongo ¶
type DataStoreMongo struct {
// contains filtered or unexported fields
}
func NewDataStoreMongo ¶
func NewDataStoreMongo(config DataStoreMongoConfig) (*DataStoreMongo, error)
func NewDataStoreMongoWithSession ¶
func NewDataStoreMongoWithSession(s *mgo.Session) *DataStoreMongo
func (*DataStoreMongo) DeleteDeviceAuth ¶
func (*DataStoreMongo) DeleteDeviceAuthByDevice ¶
func (*DataStoreMongo) EnsureIndexes ¶
func (db *DataStoreMongo) EnsureIndexes(ctx context.Context, s *mgo.Session) error
func (*DataStoreMongo) GetDeviceAuth ¶
func (db *DataStoreMongo) GetDeviceAuth(ctx context.Context, id model.AuthID) (*model.DeviceAuth, error)
func (*DataStoreMongo) GetDeviceAuths ¶
func (db *DataStoreMongo) GetDeviceAuths(ctx context.Context, skip, limit int, filter store.Filter) ([]model.DeviceAuth, error)
func (*DataStoreMongo) GetDeviceAuthsByIdentityData ¶
func (db *DataStoreMongo) GetDeviceAuthsByIdentityData(ctx context.Context, idata string) ([]model.DeviceAuth, error)
func (*DataStoreMongo) InsertDeviceAuth ¶
func (db *DataStoreMongo) InsertDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
func (*DataStoreMongo) Migrate ¶
func (db *DataStoreMongo) Migrate(ctx context.Context, version string) error
func (*DataStoreMongo) MigrateTenant ¶
func (*DataStoreMongo) PutDeviceAuth ¶
func (db *DataStoreMongo) PutDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
func (*DataStoreMongo) UpdateDeviceAuth ¶
func (db *DataStoreMongo) UpdateDeviceAuth(ctx context.Context, dev *model.DeviceAuth) error
func (*DataStoreMongo) WithAutomigrate ¶
func (db *DataStoreMongo) WithAutomigrate() store.DataStore
Click to show internal directories.
Click to hide internal directories.