Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamInterceptor ¶
func StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
StreamInterceptor is the stream middleware that checks authentication
func UnaryInterceptor ¶
func UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryInterceptor is the unary middleware that checks authentication
Types ¶
type User ¶
type User struct { ID int64 `db:"id" json:"id"` Username string `db:"username" json:"username"` Password string `json:"password"` HashedPassword []byte `db:"hashed_password"` }
User represents a single system user.
func CreateUser ¶
CreateUser adds a new user record to the database and populates the new ID.
func GetUserByUsername ¶
GetUserByUsername returns a persisted user given a username.
Click to show internal directories.
Click to hide internal directories.