global

package
v0.0.0-...-201036b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUsernameBySid

func GetUsernameBySid(sid string) (string, error)

func NewGrpcClientOptions

func NewGrpcClientOptions(tracer *zipkin.Tracer, name string, logger log.Logger) []transportgrpc.ClientOption

func NewGrpcServerOptions

func NewGrpcServerOptions(tracer *zipkin.Tracer, name string, logger log.Logger) []transportgrpc.ServerOption

func NewHttpServerOptions

func NewHttpServerOptions(tracer *zipkin.Tracer, name string, logger log.Logger) []transporthttp.ServerOption

func NewLogger

func NewLogger(servicename string) log.Logger

func NewZipkinTracer

func NewZipkinTracer(serviceName, hostPort, zipkinhttpurl string, logger log.Logger) (*zipkin.Tracer, error)

func NoDecodeRequestFunc

func NoDecodeRequestFunc(ctx context.Context, i interface{}) (request interface{}, err error)

func NoDecodeResponseFunc

func NoDecodeResponseFunc(ctx context.Context, i interface{}) (response interface{}, err error)

func NoEncodeRequestFunc

func NoEncodeRequestFunc(ctx context.Context, i interface{}) (request interface{}, err error)

func NoEncodeResponseFunc

func NoEncodeResponseFunc(ctx context.Context, i interface{}) (response interface{}, err error)

Types

type AccountTable

type AccountTable struct {
	Balance int64
}

func GetAccountByUsername

func GetAccountByUsername(username string) (AccountTable, error)

type UserTable

type UserTable struct {
	Uid string
	Pwd string
	Sid string
}

func GetUserByUsername

func GetUserByUsername(username string) (UserTable, error)

Jump to

Keyboard shortcuts

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