util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthRefresh    = "RefreshToken"
	AuthHeaderkey  = "authorization"
	AuthTypeBearer = "bearer"
	AuthPayload    = "authorization_payload"
)

Variables

This section is empty.

Functions

func ValidateFileType

func ValidateFileType(input multipart.File) error

Types

type CreateQueue

type CreateQueue struct {
	FromAccountID int64
	ToAccountID   int64
}

type UserInfo

type UserInfo struct {
	ID            string `json:"id,omitempty"`
	Email         string `json:"email,omitempty"`
	VerifiedEmail bool   `json:"verified_email,omitempty"`
	Name          string `json:"name,omitempty"`
	GivenName     string `json:"given_name,omitempty"`
	FamilyName    string `json:"family_name,omitempty"`
	Picture       string `json:"picture,omitempty"`
	Locale        string `json:"locale,omitempty"`
}

type UtilTools

type UtilTools interface {
	GetRedisPayload(ctx context.Context, uid string, payload interface{}) error
	TokenHelper(ctx context.Context, token oauth2.TokenSource) (*oauth2.Token, error)
	AuthPayload(c echo.Context) (*token.Payload, error)
	// contains filtered or unexported methods
}

func NewApiUtil

func NewApiUtil(store db.PostgresStore, redis redis.Store, cfg util.Config) UtilTools

Jump to

Keyboard shortcuts

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