struct_to_map

package
v0.0.0-...-fc17aaa Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagName = "json"
)

Variables

View Source
var (
	ErrParam    = errors.New("参数不正确")
	ErrNotFound = errors.New("查询结果为0")
)
View Source
var File_proto_great_hall_proto protoreflect.FileDescriptor
View Source
var (
	Nil = []byte("null")
)

Functions

func Decode

func Decode(dst interface{}, data map[string]string) error

func Encode

func Encode(data interface{}) []interface{}

func Find

func Find(ctx context.Context, redisClient redis.Cmdable, dst interface{}, key string, fields []string) error

func GetTagByField

func GetTagByField(field reflect.StructField, fieldTag string) string

func Storge

func Storge(ctx context.Context, redisClient redis.Cmdable, key string, data ...interface{}) error

Types

type Request

type Request struct {
	Ping string `protobuf:"bytes,1,opt,name=ping,proto3" json:"ping,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetPing

func (x *Request) GetPing() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Pong string `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetPong

func (x *Response) GetPong() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type StructValue

type StructValue struct {
	// contains filtered or unexported fields
}

func Struct

func Struct(dst interface{}) (StructValue, error)

func (StructValue) Scan

func (s StructValue) Scan(key string, value string) error

Jump to

Keyboard shortcuts

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