server

package
v0.0.0-...-1c92e5d Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	GetUser(ctx context.Context, id string) (repo.User, error)
	CreateUser(ctx context.Context, name string) (repo.User, error)
	ListUsers(ctx context.Context, names []string, order *repo.SortOrder) ([]repo.User, error)
}

Repository allows storing and fetching of users and deployments.

type Server

type Server struct {
	Repo   Repository
	Admin  *User
	Logger *logrus.Logger
}

Server implements the gRPC server interface

func (*Server) CreateUser

CreateUser creates a new user in the database.

func (*Server) GetUser

GetUser returns the user corresponding to the ID, if found.

func (*Server) ListUsers

ListUsers returns all the users matching the filters.

type User

type User struct {
	Username string
	Password string
}

User describes an authenticated user

Jump to

Keyboard shortcuts

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