Documentation ¶
Index ¶
- type Config
- type OutlineUser
- type Roach
- func (r *Roach) AddUser(ctx context.Context, user *OutlineUser) (string, error)
- func (r *Roach) DeleteUser(ctx context.Context, id string) error
- func (roach *Roach) GetToken(ctx context.Context, token string) (*Token, error)
- func (r *Roach) GetUser(ctx context.Context, id string) (*OutlineUser, error)
- func (r *Roach) ListAllUsers(ctx context.Context) ([]*OutlineUser, error)
- func (r *Roach) ListUsers(ctx context.Context, user string) ([]*OutlineUser, error)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Address that locates our postgres instance Host string // Port to connect to Port string // User that has access to the database User string // Password so that the user can login Password string // Database to connect to (must have been created priorly) Database string }
Config holds the configuration used for instantiating a new Roach.
type OutlineUser ¶
type OutlineUser struct { User string `json:"user" bson:"user"` // fruitice user ID string `json:"id" bson:"id"` // outline user id Cipher string `json:"cipher" bson:"cipher"` // outline cipher (e.g.: "chacha20-ietf-poly1305") Secret string `json:"secret,omitempty" bson:"secret"` // outline secret }
type Roach ¶
type Roach struct { Client *mongo.Client Db *mongo.Database // contains filtered or unexported fields }
Roach is a pointer to mongo connection
func (*Roach) DeleteUser ¶
DeleteUser deletes a proxy user
func (*Roach) ListAllUsers ¶
func (r *Roach) ListAllUsers(ctx context.Context) ([]*OutlineUser, error)
ListAllUsers list all outline users
Click to show internal directories.
Click to hide internal directories.