Documentation
¶
Index ¶
- func CheckPassword(format string, hashedPassword string, args ...interface{}) error
- func ConvertInt32MapToIntMap(input map[int32]int32) map[int]int
- func ConvertInt32SliceToIntSlice(input []int32) []int
- func ConvertIntMapToInt32Map(input map[int]int) map[int32]int32
- func ConvertIntSliceToInt32Slice(input []int) []int32
- func ConvertToProtoTimestamp(input time.Time) *timestamppb.Timestamp
- func GetImageDimension(data []byte) (int, int, error)
- func GetImageExtension(fileName string) string
- func HashPassword(format string, args ...interface{}) (string, error)
- func RandomString(length int) (string, error)
- func Recovery()
- type UID
- func (uid *UID) GetLocalID() uint32
- func (uid *UID) GetObjectType() int
- func (uid *UID) GetShardID() uint32
- func (uid *UID) MarshalJSON() ([]byte, error)
- func (uid *UID) Scan(value interface{}) error
- func (uid *UID) String() string
- func (uid *UID) UnmarshalJSON(data []byte) error
- func (uid *UID) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func ConvertToProtoTimestamp ¶
func ConvertToProtoTimestamp(input time.Time) *timestamppb.Timestamp
func GetImageExtension ¶
func HashPassword ¶
func RandomString ¶
Types ¶
type UID ¶
type UID struct {
// contains filtered or unexported fields
}
UID is method to generate a virtual unique identifier for whole system its structure contains 62 bits: LocalID - ObjectType - ShardID 32 bits for Local ID, max (2^32) - 1 10 bits for Object Type 18 bits for Shard ID
func DecomposeUID ¶
func UIDFromString ¶
func (*UID) GetLocalID ¶
func (*UID) GetObjectType ¶
func (*UID) GetShardID ¶
func (*UID) MarshalJSON ¶
func (*UID) String ¶
Shard: 1, Object: 1, ID: 1 => 0001 0001 0001 1 << 8 = 0001 0000 0000 1 << 4 = 1 0000 1 << 0 = 1
=> 0001 0001 0001
func (*UID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.