service

package
v0.0.0-...-61d2ec2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_CODE_400 = "Bad Request"
	STATUS_CODE_403 = "Forbidden"
	STATUS_CODE_500 = "Internal Server Error"
)

Variables

This section is empty.

Functions

func ConvertDetourDtoToModel

func ConvertDetourDtoToModel(d dto.DetourResponse) (detour []*model.Detour)

func ConvertResponseArticle

func ConvertResponseArticle(response []byte) (info dto.ArticleResponse)

func ConvertResponseArticles

func ConvertResponseArticles(response []byte) (info dto.ArticlesResponse)

func ConvertResponseDetour

func ConvertResponseDetour(response []byte) (info dto.DetourResponse)

func ConvertResponseLike

func ConvertResponseLike(response []byte) dto.MutationResponse

func ConvertResponseList

func ConvertResponseList(response []byte) (info dto.ListResponse)

func ConvertResponseLog

func ConvertResponseLog(response []byte) (info dto.LogResponse)

func ConvertResponseLogs

func ConvertResponseLogs(response []byte) (info dto.LogsResponse)

func ConvertResponseMutation

func ConvertResponseMutation(response []byte) (info dto.MutationResponse)

func ConvertResponseSpot

func ConvertResponseSpot(response []byte) (info dto.SpotResponse)

func ConvertSpotDtoToModel

func ConvertSpotDtoToModel(d dto.SpotResponse) *model.Spot

type converter

func CreateHeaderLoader

func CreateHeaderLoader(ctx context.Context, keys ...string) (claims map[string]string, errors []*model.Errors)

func GenerateToken

func GenerateToken(id string) (string, error)

func Hmac

func Hmac(token *jwt.Token) (interface{}, error)

func MakeError

func MakeError(code int, msg string) (errors *model.Errors)

func MakeErrors

func MakeErrors(code int, err error) []*model.Errors

func VerifyToken

func VerifyToken(token string) (*dto.ClimeLoader, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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