helper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 11 Imported by: 9

Documentation

Index

Constants

View Source
const (
	KeyErrorNotFound      = "not found"
	KeyErrorExist         = "already exists"
	KeyErrorSave          = "create is failed"
	KeyErrorUpdate        = "update is failed"
	KeyErrorDelete        = "delete is failed"
	KeyErorrAccessDenied  = "access denied"
	KeyErrorInvalidParams = "invalid params"
	KeyErrorParse         = "parse is failed"
	KeyErrorOpen          = "open is failed"
	KeyErrorClose         = "close is failed"
	KeyErrorRead          = "read is failed"
	KeyErrorWrite         = "write is faleid"
	KeyErrorGenerate      = "generate is falied"
	KeyErrorSend          = "send is faied"
)

Variables

View Source
var C chan os.Signal

Functions

func CreateConn

func CreateConn(addr string) (conn *grpc.ClientConn, ctx context.Context, closeCtx context.CancelFunc, err error)

func Dispatch

func Dispatch(f interface{}, args ...interface{}) error

func Hash

func Hash(data, salt string) string

func ParseConfig

func ParseConfig(path string, out interface{}) error

Types

type ErrCode

type ErrCode byte
const (
	ErrorNotFound ErrCode = iota
	ErrorExist
	ErrorSave
	ErrorUpdate
	ErrorDelete
	ErorrAccessDeniedToken
	ErorrAccessDeniedParams
	ErrorInvalidParams
	ErrorParse
	ErrorOpen
	ErrorClose
	ErrorWrite
	ErrorRead
	ErrorGenerate
	ErrorSend
)

type GroupsType

type GroupsType string
const (
	Observer    GroupsType = "observer"
	Monitor     GroupsType = "monitor"
	WS          GroupsType = "ws"
	Bot         GroupsType = "bot"
	Support     GroupsType = "support"
	Valid       GroupsType = "valid"
	Auth        GroupsType = "auth"
	User        GroupsType = "user"
	Recrut      GroupsType = "recrut"
	Event       GroupsType = "event"
	Office      GroupsType = "office"
	Product     GroupsType = "product"
	News        GroupsType = "news"
	Knows       GroupsType = "knows"
	Filling     GroupsType = "filling"
	Group       GroupsType = "group"
	Quota       GroupsType = "quota"
	Cert        GroupsType = "cert"
	Proposal    GroupsType = "proposal"
	Comment     GroupsType = "comment"
	Notif       GroupsType = "notif"
	Transatcion GroupsType = "transatcion"
	Skillpoint  GroupsType = "skillpoint"
	Analitic    GroupsType = "analitic"
	Uploads     GroupsType = "uploads"
	Phone       GroupsType = "phone"
	Email       GroupsType = "email"
	Xtech       GroupsType = "xtech"
)

type ResponseError

type ResponseError struct {
	Code ErrCode `json:"code"`
	Msg  string  `json:"msg"`
}

ResponseError модель ошибки

type ResponseModel

type ResponseModel struct {
	Success bool        `json:"success"`
	Result  interface{} `json:"result"`
}

ResponseModel модель ответа

Jump to

Keyboard shortcuts

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