1package proto
2
3import "golang.org/x/crypto/ssh"
4
5// User is an interface representing a user.
6type User interface {
7 // ID returns the user's ID.
8 ID() int64
9 // Username returns the user's username.
10 Username() string
11 // IsAdmin returns whether the user is an admin.
12 IsAdmin() bool
13 // PublicKeys returns the user's public keys.
14 PublicKeys() []ssh.PublicKey
15}
16
17// UserOptions are options for creating a user.
18type UserOptions struct {
19 // Admin is whether the user is an admin.
20 Admin bool
21 // PublicKeys are the user's public keys.
22 PublicKeys []ssh.PublicKey
23}