Documentation ¶
Index ¶
- Variables
- func Encrypt(password string) ([]byte, []byte)
- type Agg
- type ClaimAuth
- func (*ClaimAuth) Descriptor() ([]byte, []int)
- func (this *ClaimAuth) Equal(that interface{}) bool
- func (this *ClaimAuth) GoString() string
- func (m *ClaimAuth) Marshal() (dAtA []byte, err error)
- func (m *ClaimAuth) MarshalTo(dAtA []byte) (int, error)
- func (m *ClaimAuth) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClaimAuth) ProtoMessage()
- func (m *ClaimAuth) Reset()
- func (m *ClaimAuth) Size() (n int)
- func (this *ClaimAuth) String() string
- func (m *ClaimAuth) Unmarshal(dAtA []byte) error
- func (m *ClaimAuth) XXX_DiscardUnknown()
- func (m *ClaimAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClaimAuth) XXX_Merge(src proto.Message)
- func (m *ClaimAuth) XXX_Size() int
- func (m *ClaimAuth) XXX_Unmarshal(b []byte) error
- type ClaimEntity
- func (*ClaimEntity) Descriptor() ([]byte, []int)
- func (this *ClaimEntity) Equal(that interface{}) bool
- func (this *ClaimEntity) GoString() string
- func (m *ClaimEntity) Marshal() (dAtA []byte, err error)
- func (m *ClaimEntity) MarshalTo(dAtA []byte) (int, error)
- func (m *ClaimEntity) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClaimEntity) ProtoMessage()
- func (c ClaimEntity) Require(rs ...Requirement) error
- func (m *ClaimEntity) Reset()
- func (m *ClaimEntity) Size() (n int)
- func (this *ClaimEntity) String() string
- func (m *ClaimEntity) Unmarshal(dAtA []byte) error
- func (m *ClaimEntity) XXX_DiscardUnknown()
- func (m *ClaimEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClaimEntity) XXX_Merge(src proto.Message)
- func (m *ClaimEntity) XXX_Size() int
- func (m *ClaimEntity) XXX_Unmarshal(b []byte) error
- type ClaimResources
- func (*ClaimResources) Descriptor() ([]byte, []int)
- func (this *ClaimResources) Equal(that interface{}) bool
- func (this *ClaimResources) GoString() string
- func (m *ClaimResources) Marshal() (dAtA []byte, err error)
- func (m *ClaimResources) MarshalTo(dAtA []byte) (int, error)
- func (m *ClaimResources) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClaimResources) ProtoMessage()
- func (m *ClaimResources) Reset()
- func (m *ClaimResources) Size() (n int)
- func (this *ClaimResources) String() string
- func (m *ClaimResources) Unmarshal(dAtA []byte) error
- func (m *ClaimResources) XXX_DiscardUnknown()
- func (m *ClaimResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClaimResources) XXX_Merge(src proto.Message)
- func (m *ClaimResources) XXX_Size() int
- func (m *ClaimResources) XXX_Unmarshal(b []byte) error
- type Claims
- type Command
- type Entity
- func (e Entity) Check() error
- func (*Entity) Descriptor() ([]byte, []int)
- func (this *Entity) Equal(that interface{}) bool
- func (this *Entity) GoString() string
- func (m *Entity) Marshal() (dAtA []byte, err error)
- func (m *Entity) MarshalTo(dAtA []byte) (int, error)
- func (m *Entity) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Entity) ProtoMessage()
- func (m *Entity) Reset()
- func (m *Entity) Size() (n int)
- func (this *Entity) String() string
- func (m *Entity) Unmarshal(dAtA []byte) error
- func (m *Entity) XXX_DiscardUnknown()
- func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Entity) XXX_Merge(src proto.Message)
- func (m *Entity) XXX_Size() int
- func (m *Entity) XXX_Unmarshal(b []byte) error
- type ErrEmptyName
- type ErrEmptyPermissions
- type ErrForbiddenAdminRole
- type ErrInvalidClaims
- type ErrInvalidNameLength
- type ErrInvalidPassword
- type ErrUnauthorizedCommand
- type ErrUnauthorizedResource
- type ErrUnauthorizedRole
- type ErrUnknownCommand
- type ErrUnknownEntity
- type ErrUnknownResource
- type Filter
- type FilterEntity
- type FilterPermission
- type FilterRole
- type FilterRoleUser
- type Patch
- type PatchEntity
- type PatchRole
- type Permission
- func (*Permission) Descriptor() ([]byte, []int)
- func (this *Permission) Equal(that interface{}) bool
- func (this *Permission) GoString() string
- func (m *Permission) Marshal() (dAtA []byte, err error)
- func (m *Permission) MarshalTo(dAtA []byte) (int, error)
- func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Permission) ProtoMessage()
- func (m *Permission) Reset()
- func (m *Permission) Size() (n int)
- func (this *Permission) String() string
- func (m *Permission) Unmarshal(dAtA []byte) error
- func (m *Permission) XXX_DiscardUnknown()
- func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Permission) XXX_Merge(src proto.Message)
- func (m *Permission) XXX_Size() int
- func (m *Permission) XXX_Unmarshal(b []byte) error
- type Permissions
- type Requirement
- type Resource
- type Role
- func (r Role) Check() error
- func (*Role) Descriptor() ([]byte, []int)
- func (this *Role) Equal(that interface{}) bool
- func (this *Role) GoString() string
- func (m *Role) Marshal() (dAtA []byte, err error)
- func (m *Role) MarshalTo(dAtA []byte) (int, error)
- func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Role) ProtoMessage()
- func (m *Role) Reset()
- func (m *Role) Size() (n int)
- func (this *Role) String() string
- func (m *Role) Unmarshal(dAtA []byte) error
- func (m *Role) XXX_DiscardUnknown()
- func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Role) XXX_Merge(src proto.Message)
- func (m *Role) XXX_Size() int
- func (m *Role) XXX_Unmarshal(b []byte) error
- type RoleUser
- func (*RoleUser) Descriptor() ([]byte, []int)
- func (this *RoleUser) Equal(that interface{}) bool
- func (this *RoleUser) GoString() string
- func (m *RoleUser) Marshal() (dAtA []byte, err error)
- func (m *RoleUser) MarshalTo(dAtA []byte) (int, error)
- func (m *RoleUser) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RoleUser) ProtoMessage()
- func (m *RoleUser) Reset()
- func (m *RoleUser) Size() (n int)
- func (this *RoleUser) String() string
- func (m *RoleUser) Unmarshal(dAtA []byte) error
- func (m *RoleUser) XXX_DiscardUnknown()
- func (m *RoleUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RoleUser) XXX_Merge(src proto.Message)
- func (m *RoleUser) XXX_Size() int
- func (m *RoleUser) XXX_Unmarshal(b []byte) error
- type Roles
- type Store
- type StoreEntity
- type StorePermission
- type StoreRole
- type StoreRoleUser
- type U
- func (u U) Check(password string) error
- func (*U) Descriptor() ([]byte, []int)
- func (this *U) Equal(that interface{}) bool
- func (this *U) GoString() string
- func (m *U) Marshal() (dAtA []byte, err error)
- func (m *U) MarshalTo(dAtA []byte) (int, error)
- func (m *U) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*U) ProtoMessage()
- func (m *U) Reset()
- func (m *U) Size() (n int)
- func (this *U) String() string
- func (m *U) Unmarshal(dAtA []byte) error
- func (m *U) XXX_DiscardUnknown()
- func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *U) XXX_Merge(src proto.Message)
- func (m *U) XXX_Size() int
- func (m *U) XXX_Unmarshal(b []byte) error
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 ¶
Types ¶
type Agg ¶
type Agg interface { transaction.Transactioner Store StoreEntity StoreRole StorePermission StoreRoleUser CreateJWT(context.Context, U, string, time.Duration) (string, error) ReadJWT(context.Context, string) (Claims, error) Auth(context.Context, string) (Claims, error) }
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 (*ClaimAuth) Descriptor ¶
func (*ClaimAuth) MarshalToSizedBuffer ¶
func (*ClaimAuth) ProtoMessage ¶
func (*ClaimAuth) ProtoMessage()
func (*ClaimAuth) XXX_DiscardUnknown ¶
func (m *ClaimAuth) XXX_DiscardUnknown()
func (*ClaimAuth) XXX_Marshal ¶
func (*ClaimAuth) XXX_Unmarshal ¶
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) 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) 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 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 (*Entity) Descriptor ¶
func (*Entity) MarshalToSizedBuffer ¶
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) XXX_DiscardUnknown ¶
func (m *Entity) XXX_DiscardUnknown()
func (*Entity) XXX_Marshal ¶
func (*Entity) XXX_Unmarshal ¶
type ErrEmptyName ¶
type ErrEmptyName struct{}
func (ErrEmptyName) Error ¶
func (e ErrEmptyName) Error() string
type ErrEmptyPermissions ¶
type ErrEmptyPermissions struct{}
func (ErrEmptyPermissions) Error ¶
func (e ErrEmptyPermissions) Error() string
type ErrForbiddenAdminRole ¶
type ErrForbiddenAdminRole struct{}
func (ErrForbiddenAdminRole) Error ¶
func (e ErrForbiddenAdminRole) Error() string
type ErrInvalidClaims ¶
type ErrInvalidClaims struct {
Err error
}
func (ErrInvalidClaims) Error ¶
func (e ErrInvalidClaims) Error() string
type ErrInvalidNameLength ¶
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 {}
func (ErrUnauthorizedCommand) Error ¶
func (e ErrUnauthorizedCommand) Error() string
type ErrUnauthorizedResource ¶
type ErrUnauthorizedResource struct {
}func (ErrUnauthorizedResource) Error ¶
func (e ErrUnauthorizedResource) Error() string
type ErrUnauthorizedRole ¶
type ErrUnauthorizedRole struct {
}func (ErrUnauthorizedRole) Error ¶
func (e ErrUnauthorizedRole) Error() string
type ErrUnknownCommand ¶
type ErrUnknownCommand struct {
Command string
}
func (ErrUnknownCommand) Error ¶
func (e ErrUnknownCommand) Error() string
type ErrUnknownEntity ¶
type ErrUnknownEntity struct {
EntityID string
}
func (ErrUnknownEntity) Error ¶
func (e ErrUnknownEntity) Error() string
type ErrUnknownResource ¶
type ErrUnknownResource struct {
Resource string
}
func (ErrUnknownResource) Error ¶
func (e ErrUnknownResource) Error() string
type FilterEntity ¶
type FilterPermission ¶
type FilterRole ¶
type FilterRoleUser ¶
type PatchEntity ¶
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) 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 Permissions ¶
type Permissions []Permission
func (Permissions) ByRole ¶
func (ps Permissions) ByRole() map[string][]Permission
func (Permissions) Check ¶
func (ps Permissions) Check() error
type Requirement ¶
func NewRequirements ¶
func NewRequirements(entityIDs []ulid.ID, resource Resource, command Command) []Requirement
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 (*Role) Descriptor ¶
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) XXX_DiscardUnknown ¶
func (m *Role) XXX_DiscardUnknown()
func (*Role) XXX_Unmarshal ¶
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 (*RoleUser) Descriptor ¶
func (*RoleUser) MarshalToSizedBuffer ¶
func (*RoleUser) ProtoMessage ¶
func (*RoleUser) ProtoMessage()
func (*RoleUser) XXX_DiscardUnknown ¶
func (m *RoleUser) XXX_DiscardUnknown()
func (*RoleUser) XXX_Marshal ¶
func (*RoleUser) XXX_Unmarshal ¶
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) ListByRole(context.Context, Filter) (map[string][]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) ([]Entity, 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 UpdateRole(context.Context, FilterRole, PatchRole) ([]Role, error) FetchRole(context.Context, FilterRole) (Role, error) ListRole(context.Context, FilterRole) ([]Role, uint64, error) ListRoleByUser(context.Context, FilterRole) (map[string][]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 (*U) Descriptor ¶
func (*U) ProtoMessage ¶
func (*U) ProtoMessage()
func (*U) XXX_DiscardUnknown ¶
func (m *U) XXX_DiscardUnknown()
func (*U) XXX_Unmarshal ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.