Documentation ¶
Index ¶
- type Backend
- type Memory
- func (m Memory) CreateUser(ctx context.Context, in *pkgModels.User) (out *pkgModels.User, err error)
- func (m Memory) GetUser(ctx context.Context, subject string) (out *pkgModels.User, err error)
- func (m Memory) ListUsers(ctx context.Context) (out []*pkgModels.User, err error)
- func (m Memory) Ping(ctx context.Context) error
- func (m Memory) UpdateUser(ctx context.Context, in *pkgModels.User) (out *pkgModels.User, err error)
- type Mongo
- func (m Mongo) CreateUser(ctx context.Context, in *pkgModels.User) (out *pkgModels.User, err error)
- func (m Mongo) GetUser(ctx context.Context, sub string) (out *pkgModels.User, err error)
- func (m Mongo) ListUsers(ctx context.Context) (out []*pkgModels.User, err error)
- func (m Mongo) Ping(ctx context.Context) error
- func (m Mongo) UpdateUser(ctx context.Context, in *pkgModels.User) (out *pkgModels.User, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { CreateUser(context.Context, *models.User) (out *models.User, err error) UpdateUser(context.Context, *models.User) (out *models.User, err error) GetUser(ctx context.Context, subject string) (out *models.User, err error) ListUsers(context.Context) (out []*models.User, err error) Ping(context.Context) error }
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewMemoryBackend ¶
func NewMemoryBackend(options *models.BackendOptions) *Memory
func (Memory) CreateUser ¶
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func NewMongoBackend ¶
func (Mongo) CreateUser ¶
Click to show internal directories.
Click to hide internal directories.