libatframe_utils_proto_utility

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisListIndexField = "index_number"
)

Variables

View Source
var CASKeyField = "CAS_VERSION"

Functions

func MessageReadableText

func MessageReadableText(msg proto.Message) string

func MessageReadableTextIndent

func MessageReadableTextIndent(msg proto.Message) string

func PBMapToRedisKLAdd

func PBMapToRedisKLAdd(msg proto.Message, maxLen uint32) (ret []string)

func PBMapToRedisKLUpdate

func PBMapToRedisKLUpdate(msg proto.Message, listIndex uint64) (ret []string)

func PBMapToRedisKV

func PBMapToRedisKV(msg proto.Message, CASVersion *uint64, forceUpdate bool) []string

func RedisKVMapToPB

func RedisKVMapToPB(data map[string]string, msg proto.Message) (uint64, error)

func RedisSliceKVMapToPB

func RedisSliceKVMapToPB(field []string, data []interface{}, msg proto.Message) (uint64, bool, error)

Types

type RedisListIndexMessage

type RedisListIndexMessage struct {
	// Table 为 IsNil 则认为无数据
	Table     proto.Message
	ListIndex uint64
}

func RedisKLMapToPB

func RedisKLMapToPB(data map[string]string, messageCreate func() proto.Message) ([]RedisListIndexMessage, error)

func RedisSliceKLMapToPB

func RedisSliceKLMapToPB(sliceKey []RedisSliceKey, data []interface{}, messageCreate func() proto.Message) ([]RedisListIndexMessage, error)

type RedisSliceKey

type RedisSliceKey struct {
	Index uint64
}

Jump to

Keyboard shortcuts

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