Documentation
¶
Index ¶
- type Consensus
- type Distributed
- func (m *Distributed) CreateUser(ctx context.Context, id int64, login, password string, metadata []byte) (user *model.User, err error)
- func (m *Distributed) DeleteUser(ctx context.Context, id int64) (err error)
- func (m *Distributed) FindUser(ctx context.Context, login string) (user *model.User, err error)
- func (m *Distributed) GetServers(ctx context.Context) ([]*api.Server, error)
- func (m *Distributed) GetUser(ctx context.Context, id int64) (user *model.User, err error)
- func (m *Distributed) MakePremium(ctx context.Context, id int64, invoiceID, createdAt, expiresAt string) (err error)
- func (m *Distributed) UpdateUser(ctx context.Context, id int64, login *string, metadata []byte) (err error)
- type UsersRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distributed ¶
type Distributed struct {
// contains filtered or unexported fields
}
func New ¶
func New(consensus Consensus, usersRepo UsersRepository, log *logger.Logger) *Distributed
func (*Distributed) CreateUser ¶
func (*Distributed) DeleteUser ¶
func (m *Distributed) DeleteUser(ctx context.Context, id int64) (err error)
func (*Distributed) GetServers ¶
func (*Distributed) MakePremium ¶
func (*Distributed) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.