user

package
v0.0.0-...-5bc77b5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthClaims        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClaims          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClaims = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthEntity        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEntity          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEntity = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	Resources = map[Resource]struct{}{
		R_asset:     {},
		R_entity:    {},
		R_operation: {},
		R_role:      {},
		R_user:      {},
	}

	Commands = map[Command]struct{}{
		C_read:   {},
		C_create: {},
		C_update: {},
		C_delete: {},
	}
)
View Source
var (
	ErrInvalidLengthRole        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRole          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRole = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthUser        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUser          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Command_name = map[int32]string{
	0: "C_read",
	1: "C_create",
	2: "C_update",
	3: "C_delete",
}
View Source
var Command_value = map[string]int32{
	"C_read":   0,
	"C_create": 1,
	"C_update": 2,
	"C_delete": 3,
}
View Source
var Resource_name = map[int32]string{
	0: "R_asset",
	1: "R_entity",
	2: "R_operation",
	3: "R_role",
	4: "R_user",
}
View Source
var Resource_value = map[string]int32{
	"R_asset":     0,
	"R_entity":    1,
	"R_operation": 2,
	"R_role":      3,
	"R_user":      4,
}

Functions

func Encrypt

func Encrypt(password string) ([]byte, []byte)

Types

type ClaimAuth

type ClaimAuth struct {
	// Entities key must be a entity.ID
	Entities map[string]ClaimEntity `` /* 147-byte string literal not displayed */
}

func NewPopulatedClaimAuth

func NewPopulatedClaimAuth(r randyClaims, easy bool) *ClaimAuth

func (*ClaimAuth) Descriptor

func (*ClaimAuth) Descriptor() ([]byte, []int)

func (*ClaimAuth) Equal

func (this *ClaimAuth) Equal(that interface{}) bool

func (*ClaimAuth) GoString

func (this *ClaimAuth) GoString() string

func (*ClaimAuth) Marshal

func (m *ClaimAuth) Marshal() (dAtA []byte, err error)

func (*ClaimAuth) MarshalTo

func (m *ClaimAuth) MarshalTo(dAtA []byte) (int, error)

func (*ClaimAuth) MarshalToSizedBuffer

func (m *ClaimAuth) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimAuth) ProtoMessage

func (*ClaimAuth) ProtoMessage()

func (*ClaimAuth) Reset

func (m *ClaimAuth) Reset()

func (*ClaimAuth) Size

func (m *ClaimAuth) Size() (n int)

func (*ClaimAuth) String

func (this *ClaimAuth) String() string

func (*ClaimAuth) Unmarshal

func (m *ClaimAuth) Unmarshal(dAtA []byte) error

func (*ClaimAuth) XXX_DiscardUnknown

func (m *ClaimAuth) XXX_DiscardUnknown()

func (*ClaimAuth) XXX_Marshal

func (m *ClaimAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimAuth) XXX_Merge

func (m *ClaimAuth) XXX_Merge(src proto.Message)

func (*ClaimAuth) XXX_Size

func (m *ClaimAuth) XXX_Size() int

func (*ClaimAuth) XXX_Unmarshal

func (m *ClaimAuth) XXX_Unmarshal(b []byte) error

type ClaimEntity

type ClaimEntity struct {
	ID github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"ID"`
	// Roles key must be a user.Role ID
	Roles map[string]pbtypes.Empty `` /* 141-byte string literal not displayed */
	// Resources key must be a user.Resource
	Resources map[string]ClaimResources `` /* 149-byte string literal not displayed */
}

func NewPopulatedClaimEntity

func NewPopulatedClaimEntity(r randyClaims, easy bool) *ClaimEntity

func (*ClaimEntity) Descriptor

func (*ClaimEntity) Descriptor() ([]byte, []int)

func (*ClaimEntity) Equal

func (this *ClaimEntity) Equal(that interface{}) bool

func (*ClaimEntity) GoString

func (this *ClaimEntity) GoString() string

func (*ClaimEntity) Marshal

func (m *ClaimEntity) Marshal() (dAtA []byte, err error)

func (*ClaimEntity) MarshalTo

func (m *ClaimEntity) MarshalTo(dAtA []byte) (int, error)

func (*ClaimEntity) MarshalToSizedBuffer

func (m *ClaimEntity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimEntity) ProtoMessage

func (*ClaimEntity) ProtoMessage()

func (ClaimEntity) Require

func (c ClaimEntity) Require(rs ...Requirement) error

func (*ClaimEntity) Reset

func (m *ClaimEntity) Reset()

func (*ClaimEntity) Size

func (m *ClaimEntity) Size() (n int)

func (*ClaimEntity) String

func (this *ClaimEntity) String() string

func (*ClaimEntity) Unmarshal

func (m *ClaimEntity) Unmarshal(dAtA []byte) error

func (*ClaimEntity) XXX_DiscardUnknown

func (m *ClaimEntity) XXX_DiscardUnknown()

func (*ClaimEntity) XXX_Marshal

func (m *ClaimEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimEntity) XXX_Merge

func (m *ClaimEntity) XXX_Merge(src proto.Message)

func (*ClaimEntity) XXX_Size

func (m *ClaimEntity) XXX_Size() int

func (*ClaimEntity) XXX_Unmarshal

func (m *ClaimEntity) XXX_Unmarshal(b []byte) error

type ClaimResources

type ClaimResources struct {
	// Commands key must be a user.Commands
	Commands map[string]pbtypes.Empty `` /* 147-byte string literal not displayed */
}

func NewPopulatedClaimResources

func NewPopulatedClaimResources(r randyClaims, easy bool) *ClaimResources

func (*ClaimResources) Descriptor

func (*ClaimResources) Descriptor() ([]byte, []int)

func (*ClaimResources) Equal

func (this *ClaimResources) Equal(that interface{}) bool

func (*ClaimResources) GoString

func (this *ClaimResources) GoString() string

func (*ClaimResources) Marshal

func (m *ClaimResources) Marshal() (dAtA []byte, err error)

func (*ClaimResources) MarshalTo

func (m *ClaimResources) MarshalTo(dAtA []byte) (int, error)

func (*ClaimResources) MarshalToSizedBuffer

func (m *ClaimResources) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimResources) ProtoMessage

func (*ClaimResources) ProtoMessage()

func (*ClaimResources) Reset

func (m *ClaimResources) Reset()

func (*ClaimResources) Size

func (m *ClaimResources) Size() (n int)

func (*ClaimResources) String

func (this *ClaimResources) String() string

func (*ClaimResources) Unmarshal

func (m *ClaimResources) Unmarshal(dAtA []byte) error

func (*ClaimResources) XXX_DiscardUnknown

func (m *ClaimResources) XXX_DiscardUnknown()

func (*ClaimResources) XXX_Marshal

func (m *ClaimResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimResources) XXX_Merge

func (m *ClaimResources) XXX_Merge(src proto.Message)

func (*ClaimResources) XXX_Size

func (m *ClaimResources) XXX_Size() int

func (*ClaimResources) XXX_Unmarshal

func (m *ClaimResources) XXX_Unmarshal(b []byte) error

type Claims

type Claims struct {
	jwt.RegisteredClaims

	UserID ulid.ID
	Auth   ClaimAuth
}

func (Claims) EntityIDs

func (c Claims) EntityIDs(rs ...Requirement) []ulid.ID

func (Claims) Require

func (c Claims) Require(rs ...Requirement) error

func (Claims) RequireRoles

func (c Claims) RequireRoles(ids ...ulid.ID) error

func (Claims) RoleIDs

func (c Claims) RoleIDs() []ulid.ID

type Command

type Command int32
const (
	C_read   Command = 0
	C_create Command = 1
	C_update Command = 2
	C_delete Command = 3
)

func (Command) EnumDescriptor

func (Command) EnumDescriptor() ([]byte, []int)

func (Command) String

func (x Command) String() string

type Entity

type Entity struct {
	ID          github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"ID"`
	Name        string                             `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	AvatarURL   string                             `protobuf:"bytes,3,opt,name=AvatarURL,proto3" json:"AvatarURL,omitempty"`
	Description string                             `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"`
	CreatedAt   int64                              `protobuf:"varint,5,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt   int64                              `protobuf:"varint,6,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
}

func NewPopulatedEntity

func NewPopulatedEntity(r randyEntity, easy bool) *Entity

func (Entity) Check

func (e Entity) Check() error

func (*Entity) Descriptor

func (*Entity) Descriptor() ([]byte, []int)

func (*Entity) Equal

func (this *Entity) Equal(that interface{}) bool

func (*Entity) GoString

func (this *Entity) GoString() string

func (*Entity) Marshal

func (m *Entity) Marshal() (dAtA []byte, err error)

func (*Entity) MarshalTo

func (m *Entity) MarshalTo(dAtA []byte) (int, error)

func (*Entity) MarshalToSizedBuffer

func (m *Entity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) Reset

func (m *Entity) Reset()

func (*Entity) Size

func (m *Entity) Size() (n int)

func (*Entity) String

func (this *Entity) String() string

func (*Entity) Unmarshal

func (m *Entity) Unmarshal(dAtA []byte) error

func (*Entity) XXX_DiscardUnknown

func (m *Entity) XXX_DiscardUnknown()

func (*Entity) XXX_Marshal

func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entity) XXX_Merge

func (m *Entity) XXX_Merge(src proto.Message)

func (*Entity) XXX_Size

func (m *Entity) XXX_Size() int

func (*Entity) XXX_Unmarshal

func (m *Entity) XXX_Unmarshal(b []byte) error

type ErrEmptyName

type ErrEmptyName struct{}

func (ErrEmptyName) Error

func (e ErrEmptyName) Error() string

type ErrInvalidClaims

type ErrInvalidClaims struct {
	Err error
}

func (ErrInvalidClaims) Error

func (e ErrInvalidClaims) Error() string

type ErrInvalidNameLength

type ErrInvalidNameLength struct {
	Name   string
	Length int
}

func (ErrInvalidNameLength) Error

func (e ErrInvalidNameLength) Error() string

type ErrInvalidPassword

type ErrInvalidPassword struct{}

func (ErrInvalidPassword) Error

func (e ErrInvalidPassword) Error() string

type ErrUnauthorizedCommand

type ErrUnauthorizedCommand struct {
	Resource string
	Command  string
}

func (ErrUnauthorizedCommand) Error

func (e ErrUnauthorizedCommand) Error() string

type ErrUnauthorizedResource

type ErrUnauthorizedResource struct {
	Resource string
}

func (ErrUnauthorizedResource) Error

func (e ErrUnauthorizedResource) Error() string

type ErrUnauthorizedRole

type ErrUnauthorizedRole struct {
	Roles []string
}

func (ErrUnauthorizedRole) Error

func (e ErrUnauthorizedRole) Error() string

type ErrUnknownEntity

type ErrUnknownEntity struct {
	EntityID string
}

func (ErrUnknownEntity) Error

func (e ErrUnknownEntity) Error() string

type Filter

type Filter struct {
	ID  ulid.ID
	IDs []ulid.ID

	Email    *string
	GoogleID *string

	EntityIDs []ulid.ID

	*paginate.Paginate
	Search string
}

type FilterEntity

type FilterEntity struct {
	ID  ulid.ID
	IDs []ulid.ID

	*paginate.Paginate
	Search string
}

type FilterPermission

type FilterPermission struct {
	RoleID  ulid.ID
	RoleIDs []ulid.ID

	Resource *Resource
	Command  *Command
}

type FilterRole

type FilterRole struct {
	ID  ulid.ID
	IDs []ulid.ID

	EntityID  ulid.ID
	EntityIDs []ulid.ID

	*paginate.Paginate
	Search string
}

type FilterRoleUser

type FilterRoleUser struct {
	RoleID  ulid.ID
	RoleIDs []ulid.ID

	UserID  ulid.ID
	UserIDs []ulid.ID
}

type Patch

type Patch struct {
	FirstName *string
	LastName  *string
	AvatarURL *string
	UpdatedAt *int64
}

type PatchEntity

type PatchEntity struct {
	Name        *string
	Description *string
	AvatarURL   *string
	UpdatedAt   *int64
}

type Permission

type Permission struct {
	RoleID    github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=RoleID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"RoleID"`
	Resource  Resource                           `protobuf:"varint,2,opt,name=Resource,proto3,enum=user.Resource" json:"Resource,omitempty"`
	Command   Command                            `protobuf:"varint,3,opt,name=Command,proto3,enum=user.Command" json:"Command,omitempty"`
	CreatedAt int64                              `protobuf:"varint,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt int64                              `protobuf:"varint,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
}

func AllPermissions

func AllPermissions(roleID ulid.ID) []Permission

func NewPopulatedPermission

func NewPopulatedPermission(r randyRole, easy bool) *Permission

func (*Permission) Descriptor

func (*Permission) Descriptor() ([]byte, []int)

func (*Permission) Equal

func (this *Permission) Equal(that interface{}) bool

func (*Permission) GoString

func (this *Permission) GoString() string

func (*Permission) Marshal

func (m *Permission) Marshal() (dAtA []byte, err error)

func (*Permission) MarshalTo

func (m *Permission) MarshalTo(dAtA []byte) (int, error)

func (*Permission) MarshalToSizedBuffer

func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Permission) ProtoMessage

func (*Permission) ProtoMessage()

func (*Permission) Reset

func (m *Permission) Reset()

func (*Permission) Size

func (m *Permission) Size() (n int)

func (*Permission) String

func (this *Permission) String() string

func (*Permission) Unmarshal

func (m *Permission) Unmarshal(dAtA []byte) error

func (*Permission) XXX_DiscardUnknown

func (m *Permission) XXX_DiscardUnknown()

func (*Permission) XXX_Marshal

func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Permission) XXX_Merge

func (m *Permission) XXX_Merge(src proto.Message)

func (*Permission) XXX_Size

func (m *Permission) XXX_Size() int

func (*Permission) XXX_Unmarshal

func (m *Permission) XXX_Unmarshal(b []byte) error

type Requirement

type Requirement struct {
	EntityID ulid.ID
	Resource Resource
	Command  Command
}

func NewRequirements

func NewRequirements(entityIDs []ulid.ID, resource Resource, command Command) []Requirement

type Resource

type Resource int32
const (
	R_asset     Resource = 0
	R_entity    Resource = 1
	R_operation Resource = 2
	R_role      Resource = 3
	R_user      Resource = 4
)

func (Resource) EnumDescriptor

func (Resource) EnumDescriptor() ([]byte, []int)

func (Resource) String

func (x Resource) String() string

type Role

type Role struct {
	ID        github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"ID"`
	EntityID  github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,2,opt,name=EntityID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"EntityID"`
	Name      string                             `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	CreatedAt int64                              `protobuf:"varint,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt int64                              `protobuf:"varint,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
}

func NewPopulatedRole

func NewPopulatedRole(r randyRole, easy bool) *Role

func (*Role) Descriptor

func (*Role) Descriptor() ([]byte, []int)

func (*Role) Equal

func (this *Role) Equal(that interface{}) bool

func (*Role) GoString

func (this *Role) GoString() string

func (*Role) Marshal

func (m *Role) Marshal() (dAtA []byte, err error)

func (*Role) MarshalTo

func (m *Role) MarshalTo(dAtA []byte) (int, error)

func (*Role) MarshalToSizedBuffer

func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) Reset

func (m *Role) Reset()

func (*Role) Size

func (m *Role) Size() (n int)

func (*Role) String

func (this *Role) String() string

func (*Role) Unmarshal

func (m *Role) Unmarshal(dAtA []byte) error

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Role) XXX_Merge

func (m *Role) XXX_Merge(src proto.Message)

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

func (m *Role) XXX_Unmarshal(b []byte) error

type RoleUser

type RoleUser struct {
	RoleID    github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=RoleID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"RoleID"`
	UserID    github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,2,opt,name=UserID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"UserID"`
	CreatedAt int64                              `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt int64                              `protobuf:"varint,4,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
}

func NewPopulatedRoleUser

func NewPopulatedRoleUser(r randyRole, easy bool) *RoleUser

func (*RoleUser) Descriptor

func (*RoleUser) Descriptor() ([]byte, []int)

func (*RoleUser) Equal

func (this *RoleUser) Equal(that interface{}) bool

func (*RoleUser) GoString

func (this *RoleUser) GoString() string

func (*RoleUser) Marshal

func (m *RoleUser) Marshal() (dAtA []byte, err error)

func (*RoleUser) MarshalTo

func (m *RoleUser) MarshalTo(dAtA []byte) (int, error)

func (*RoleUser) MarshalToSizedBuffer

func (m *RoleUser) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RoleUser) ProtoMessage

func (*RoleUser) ProtoMessage()

func (*RoleUser) Reset

func (m *RoleUser) Reset()

func (*RoleUser) Size

func (m *RoleUser) Size() (n int)

func (*RoleUser) String

func (this *RoleUser) String() string

func (*RoleUser) Unmarshal

func (m *RoleUser) Unmarshal(dAtA []byte) error

func (*RoleUser) XXX_DiscardUnknown

func (m *RoleUser) XXX_DiscardUnknown()

func (*RoleUser) XXX_Marshal

func (m *RoleUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RoleUser) XXX_Merge

func (m *RoleUser) XXX_Merge(src proto.Message)

func (*RoleUser) XXX_Size

func (m *RoleUser) XXX_Size() int

func (*RoleUser) XXX_Unmarshal

func (m *RoleUser) XXX_Unmarshal(b []byte) error

type Store

type Store interface {
	Insert(context.Context, U) error
	Fetch(context.Context, Filter) (U, error)
	List(context.Context, Filter) ([]U, uint64, error)
	Update(context.Context, Filter, Patch) ([]U, error)
	Delete(context.Context, Filter) error

	FetchWithPassword(context.Context, Filter) (U, error)
	ListByEntity(context.Context, Filter) ([]U, uint64, error)
}

type StoreEntity

type StoreEntity interface {
	InsertEntity(context.Context, Entity) error
	UpdateEntity(context.Context, FilterEntity, PatchEntity) ([]Entity, error)
	FetchEntity(context.Context, FilterEntity) (Entity, error)
	ListEntity(context.Context, FilterEntity) ([]Entity, uint64, error)
	DeleteEntity(context.Context, FilterEntity) error
}

type StorePermission

type StorePermission interface {
	InsertPermission(context.Context, Permission) error
	InsertPermissions(context.Context, []Permission) error
	FetchPermission(context.Context, FilterPermission) (Permission, error)
	ListPermission(context.Context, FilterPermission) ([]Permission, error)
	DeletePermission(context.Context, FilterPermission) error
}

type StoreRole

type StoreRole interface {
	InsertRole(context.Context, Role) error
	FetchRole(context.Context, FilterRole) (Role, error)
	ListRole(context.Context, FilterRole) ([]Role, uint64, error)
	DeleteRole(context.Context, FilterRole) error
}

type StoreRoleUser

type StoreRoleUser interface {
	InsertRoleUser(context.Context, RoleUser) error
	FetchRoleUser(context.Context, FilterRoleUser) (RoleUser, error)
	ListRoleUser(context.Context, FilterRoleUser) ([]RoleUser, error)
	DeleteRoleUser(context.Context, FilterRoleUser) error

	ListClaims(context.Context, ulid.ID) (ClaimAuth, error)
}

type U

type U struct {
	ID           github_com_elojah_trax_pkg_ulid.ID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=github.com/elojah/trax/pkg/ulid.ID" json:"ID"`
	Email        string                             `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"`
	PasswordHash []byte                             `protobuf:"bytes,3,opt,name=PasswordHash,proto3" json:"PasswordHash,omitempty"`
	PasswordSalt []byte                             `protobuf:"bytes,4,opt,name=PasswordSalt,proto3" json:"PasswordSalt,omitempty"`
	GoogleID     string                             `protobuf:"bytes,5,opt,name=GoogleID,proto3" json:"GoogleID,omitempty"`
	FirstName    string                             `protobuf:"bytes,6,opt,name=FirstName,proto3" json:"FirstName,omitempty"`
	LastName     string                             `protobuf:"bytes,7,opt,name=LastName,proto3" json:"LastName,omitempty"`
	AvatarURL    string                             `protobuf:"bytes,8,opt,name=AvatarURL,proto3" json:"AvatarURL,omitempty"`
	CreatedAt    int64                              `protobuf:"varint,9,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	UpdatedAt    int64                              `protobuf:"varint,10,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
}

func NewPopulatedU

func NewPopulatedU(r randyUser, easy bool) *U

func (U) Check

func (u U) Check(password string) error

func (*U) Descriptor

func (*U) Descriptor() ([]byte, []int)

func (*U) Equal

func (this *U) Equal(that interface{}) bool

func (*U) GoString

func (this *U) GoString() string

func (*U) Marshal

func (m *U) Marshal() (dAtA []byte, err error)

func (*U) MarshalTo

func (m *U) MarshalTo(dAtA []byte) (int, error)

func (*U) MarshalToSizedBuffer

func (m *U) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*U) ProtoMessage

func (*U) ProtoMessage()

func (*U) Reset

func (m *U) Reset()

func (*U) Size

func (m *U) Size() (n int)

func (*U) String

func (this *U) String() string

func (*U) Unmarshal

func (m *U) Unmarshal(dAtA []byte) error

func (*U) XXX_DiscardUnknown

func (m *U) XXX_DiscardUnknown()

func (*U) XXX_Marshal

func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*U) XXX_Merge

func (m *U) XXX_Merge(src proto.Message)

func (*U) XXX_Size

func (m *U) XXX_Size() int

func (*U) XXX_Unmarshal

func (m *U) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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