Versions in this module Expand all Collapse all v1 v1.0.1 Jun 3, 2019 v1.0.0 Jun 2, 2019 Changes in this version + type Group struct + Leader string + Members map[string]Role + Name string + Root *storage.Root + func GenerateGroup(name, leader string) *Group + func GroupFromBytes(data []byte) (*Group, error) + func NewGroup(name, leader string, members map[string]Role, root *storage.Root) *Group + func (g *Group) RemoveMember(user, member string) bool + func (g *Group) ToBytes() []byte + func (g *Group) UpdateLeader(user, newLeader string) bool + func (g *Group) UpdateMemberRole(user, member string, role Role) bool + type Operation struct + Address string + Hash string + Name string + Path string + PublicKey string + Sea string + Signature string + Size int64 + Timestamp int64 + func NewOperation(address, publicKey, sea, path, name, hash string, size, timestamp int64, ...) *Operation + func OperationFromBytes(data []byte) (*Operation, error) + func (o *Operation) ToBytes() []byte + func (o *Operation) Verify() bool + type Role uint8 + var RoleDeveloper Role = 2 + var RoleGuest Role = 1 + var RoleMaintainer Role = 3 + var RoleOwner Role = 4 + type User struct + Groups []string + PublicKey string + Root *storage.Root + func GenerateUser(publicKey string) *User + func NewUser(publicKey string, groups []string, root *storage.Root) *User + func UserFromBytes(data []byte) (*User, error) + func (u *User) IsInGroup(group string) bool + func (u *User) JoinGroup(group string) bool + func (u *User) LeaveGroup(group string) bool + func (u *User) ToBytes() []byte + func (u *User) VerifyPublicKey(publicKey string) bool