Documentation ¶
Index ¶
- Variables
- type DB
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetHash() string
- func (m *User) GetId() string
- func (m *User) GetPermissions() []string
- func (m *User) GetSalt() string
- func (m *User) GetUsername() string
- func (m *User) HasPermission(permission string) bool
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m User) Validate(id, password string) bool
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicatedUser = errors.New("duplicated user found")
)
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (DB) DeleteUser ¶ added in v0.1.1
func (DB) GetAllUsers ¶ added in v0.1.1
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` Salt string `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"` Permissions []string `protobuf:"bytes,5,rep,name=permissions,proto3" json:"permissions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetPermissions ¶ added in v0.1.1
func (*User) GetUsername ¶
func (*User) HasPermission ¶ added in v0.1.1
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.