users

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// CreateUser creates a new user and saves it to the database.
	CreateUser(ctx context.Context, u User) (User, error)
	// GetUser gets a user from the database using the ID.
	GetUser(ctx context.Context, id string) (User, error)
	// UpdateUser updates a user record in the database.
	UpdateUser(ctx context.Context, u User) (User, error)
	// DeleteUser deletes a user record from the database.
	DeleteUser(ctx context.Context, id string) error
}

DB provides access to an underlying database.

type User

type User interface {
	GetID() string
	GetName() string
	GetPermissions() []string
}

User represents a bot user. This is satisfied by transport.User

Directories

Path Synopsis
bolt module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL