tool

package
v0.0.0-...-c2276db Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbIdToId

func DbIdToId(id *pgtype.UUID) *uuid.UUID

func DbIdToRpcId

func DbIdToRpcId(id *pgtype.UUID) *pb.UUID

func DbIdToString

func DbIdToString(id *pgtype.UUID) string

func GetFileValue

func GetFileValue(key string) string

func IdToDbId

func IdToDbId(id *uuid.UUID) *pgtype.UUID

func IdToRpcId

func IdToRpcId(id *uuid.UUID) *pb.UUID

func RpcIdToDbId

func RpcIdToDbId(id *pb.UUID) *pgtype.UUID

func RpcIdToId

func RpcIdToId(id *pb.UUID) *uuid.UUID

func StringToDbId

func StringToDbId(id string) *pgtype.UUID

Types

type Encryptor

type Encryptor struct{}

func (*Encryptor) Hash

func (gen *Encryptor) Hash(token string) (string, error)

func (*Encryptor) Validate

func (gen *Encryptor) Validate(token, hashedToken string) bool

type GrpcStatusTool

type GrpcStatusTool struct {
	Log *zerolog.Logger
}

func NewGrpcStatusTool

func NewGrpcStatusTool(
	log *zerolog.Logger,
) *GrpcStatusTool

func (*GrpcStatusTool) Internal

func (s *GrpcStatusTool) Internal(
	title string,
	details string,
	errs ...error,
) error

func (*GrpcStatusTool) InvalidArgument

func (s *GrpcStatusTool) InvalidArgument(
	title string,
	details string,
) error

func (*GrpcStatusTool) PermissionDenied

func (s *GrpcStatusTool) PermissionDenied(
	userEmail string,
	errs ...error,
) error

func (*GrpcStatusTool) Unauthenticated

func (s *GrpcStatusTool) Unauthenticated(
	userEmail string,
	errs ...error,
) error

type IEncryptor

type IEncryptor interface {
	Hash(token string) (string, error)
	Validate(token, hashedToken string) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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