Documentation
¶
Index ¶
- type Mongo
- func (m *Mongo) GetIdentity(email string) (schema.Identity, error)
- func (m *Mongo) GetIdentityByID(ctx context.Context, id string) (*schema.Identity, error)
- func (m *Mongo) GetIdentityByToken(ctx context.Context, token string) (*schema.Identity, *schema.Token, error)
- func (m *Mongo) SaveIdentity(identity schema.Identity) (string, error)
- func (m *Mongo) StoreToken(ctx context.Context, tkn schema.Token, i schema.Identity) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct { IdentityCollection string // TODO need to make this identityCollection and tokenCollection TokenCollection string // TODO need to make this identityCollection and tokenCollection Database string Session *mgo.Session URI string // contains filtered or unexported fields }
Mongo represents a simplistic MongoDB configuration.
func (*Mongo) GetIdentityByID ¶
func (*Mongo) GetIdentityByToken ¶
func (*Mongo) StoreToken ¶
StoreToken store a new token document in mongodb tokens collection. Any active token associated with the identity will be marked as deleted. Sets the last modified date on all documents updated.
Click to show internal directories.
Click to hide internal directories.