Documentation ¶
Index ¶
- Variables
- func ExtraAnnotate(comments []*ast.Comment) (map[string]*Annotate, error)
- func ExtraComment(commentGroup *ast.CommentGroup) ([]string, error)
- func Make1Key_int[T any](arr []*T, dict map[int]*T, key string) error
- func Make1Key_int32[T any](arr []*T, dict map[int32]*T, key string) error
- func Make1Key_int64[T any](arr []*T, dict map[int64]*T, key string) error
- func Make1Key_string[T any](arr []*T, dict map[string]*T, key string) error
- func Make2Key_int64_int64[T any](arr []*T, dict map[int64]map[int64]*T, key1 string, key2 string) error
- func Make2Key_int64_string[T any](arr []*T, dict map[int64]map[string]*T, key1 string, key2 string) error
- func Make2Key_int_int[T any](arr []*T, dict map[int]map[int]*T, key1 string, key2 string) error
- func Make2Key_string_int64[T any](arr []*T, dict map[string]map[int64]*T, key1 string, key2 string) error
- func Make3Key_int64_int64_int64[T any](arr []*T, dict map[int64]map[int64]map[int64]*T, key1 string, key2 string, ...) error
- type Annotate
- type Config
- type DbClient
- type DbDao
- type GenApplicationConfig
- type GenBehaviorConfig
- type GenConstConfig
- type GenModelConfig
- type GenProtocolConfig
- type GenResourceConfig
- type Logger
- type MacroConfig
- type MongoClient
- type MysqlClient
- type RedisClient
- type ResourceHandler
- type ResourceLoader
- type ResourceSource
- type TagList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGenNotChange = errors.New("doc file not changed") ErrTODO = errors.New("TODO") ErrDbNotSupport = errors.New("db not support") ErrNullPointer = errors.New("null pointer") ErrDataNotExist = errors.New("data not exist") ErrDataDeleteFail = errors.New("data delete fail") ErrDataNotFound = errors.New("data not found") )
Functions ¶
func ExtraComment ¶
func ExtraComment(commentGroup *ast.CommentGroup) ([]string, error)
func Make2Key_int64_int64 ¶
func Make2Key_int64_string ¶
func Make2Key_int_int ¶
func Make2Key_string_int64 ¶
Types ¶
type Config ¶
type Config struct { GenResource GenResourceConfig GenProtocol GenProtocolConfig GenModel GenModelConfig GenConst GenConstConfig GenBehavior GenBehaviorConfig GenApplication GenApplicationConfig Macro MacroConfig }
type GenApplicationConfig ¶
type GenBehaviorConfig ¶
type GenConstConfig ¶
type GenModelConfig ¶
type GenProtocolConfig ¶
type GenResourceConfig ¶
type Logger ¶
type Logger interface { Infow(msg string, kvs ...interface{}) Errorw(msg string, kvs ...interface{}) Debugw(msg string, kvs ...interface{}) Fatalw(msg string, kvs ...interface{}) Warnw(msg string, kvs ...interface{}) Info(args ...interface{}) Error(args ...interface{}) Debug(args ...interface{}) Fatal(args ...interface{}) Warn(args ...interface{}) Infof(format string, args ...interface{}) Errorf(format string, args ...interface{}) Debugf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Warnf(format string, args ...interface{}) }
type MacroConfig ¶
type MongoClient ¶
type MysqlClient ¶
type RedisClient ¶
type RedisClient interface { DbClient GetRedisClient() *redis.Client }
type ResourceHandler ¶
loader加载完成后,由handler进行转换处理
type ResourceLoader ¶
type ResourceLoader interface { // 加载资源 LoadResource(ctx context.Context, client DbClient, dir string, compress bool) error // 加载资源 ReloadResource(ctx context.Context, client DbClient, dir string, compress bool) error // 配置版本 GetResVersion() string // loader版本 GetLoaderVersion() string }
loader由gen生成
type ResourceSource ¶
type ResourceSource interface { // 返回资源加载器 GetResourceLoader() ResourceLoader OnResourcePreLoad(reload bool) // 资源加载完成 OnResourcePostLoad(reload bool) }
application需要实现的接口,返回loader,和接收loader的事件回调
Source Files ¶
Click to show internal directories.
Click to hide internal directories.