core

package
v1.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangDir = "lang"
	CnZh    = "cn-zh"
)
View Source
const (
	MiddlewareTypeIn    = "in"
	MiddlewareTypeOut   = "out"
	MiddlewareTypeInOut = "in/out"
)
View Source
const (
	EntityTypeService    = "service"
	EntityTypeApiGateway = "api_gateway"
	EntityTypeServer     = "server"
	EntityTypeConnector  = "api_connector"
	EntityTypePlugin     = "plugin"
	EntityTypeRouter     = "router"
	EntityTypeMiddleware = "api_middleware"
	EntityTypeDataPacker = "api_datapacker"

	ManagePing              = "Ping"
	ManageGetLoad           = "GetLoad"
	ManageResetConfig       = "ResetConfig"
	ManageUpdateConfigItems = "UpdateConfigItems"
	ManageGetConfig         = "GetConfig"
	ManageGetConfigItems    = "GetConfigItems"
)
View Source
const (
	RpcServiceRequestName = "HandleServiceRequested"
)

Variables

View Source
var (
	ErrInvalidLengthServer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowServer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupServer = fmt.Errorf("proto: unexpected end of group")
)

Functions

func CheckAndRegisterEntity

func CheckAndRegisterEntity(ins htypes.Any, router IRouter) *herrors.Error

Types

type API

type API struct {
	Name     string   `json:"name"` //接口名称
	Desc     string   `json:"desc"` //接口描述
	Disabled bool     `json:"disabled"`
	EndPoint EndPoint `json:"endpoint"` //API映射的slot
}

type APIDefine

type APIDefine struct {
	Name        string    `json:"name"`
	APIVersions []OpenAPI `json:"versions"`
}

type APIGateWayImplement

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

func NewAPIGateway

func NewAPIGateway(opt *APIGatewayOptions, args ...htypes.Any) *APIGateWayImplement

func (*APIGateWayImplement) Class

func (this *APIGateWayImplement) Class() string

func (*APIGateWayImplement) Config

func (this *APIGateWayImplement) Config() IEntityConf

func (*APIGateWayImplement) Connectors added in v1.1.29

func (this *APIGateWayImplement) Connectors() map[string]IAPIConnector

func (*APIGateWayImplement) EntityMeta

func (this *APIGateWayImplement) EntityMeta() *EntityMeta

func (*APIGateWayImplement) EntityStub

func (this *APIGateWayImplement) EntityStub() *EntityStub

func (*APIGateWayImplement) I18n

func (this *APIGateWayImplement) I18n() IAPIi18n

func (*APIGateWayImplement) Packer

func (this *APIGateWayImplement) Packer(name string) IAPIDataPacker

func (*APIGateWayImplement) PreRequestMiddleware added in v1.1.29

func (this *APIGateWayImplement) PreRequestMiddleware(version, api string, params htypes.Map) (err *herrors.Error)

func (*APIGateWayImplement) RequestAPI

func (this *APIGateWayImplement) RequestAPI(version string, api string, params htypes.Map) (ret htypes.Any, err *herrors.Error)

func (*APIGateWayImplement) RequestWSAPI added in v1.1.29

func (this *APIGateWayImplement) RequestWSAPI(version, api string, params htypes.Map) (ret htypes.Any, err *herrors.Error)

func (*APIGateWayImplement) Router

func (this *APIGateWayImplement) Router() IRouter

func (*APIGateWayImplement) Server

func (this *APIGateWayImplement) Server() IServer

func (*APIGateWayImplement) Shutdown

func (this *APIGateWayImplement) Shutdown()

func (*APIGateWayImplement) Start

func (this *APIGateWayImplement) Start()

type APIGateway

type APIGateway struct {
	EntityConfBase

	UseBreaker                    bool
	BreakerLimitAPI               bool //针对API
	BreakerLimitIP                bool //针对IP
	BreakerLimitUser              bool //针对用户
	BreakerRequestTimeout         int
	BreakerMaxConcurrentRequest   int
	BreakerRequestVolumeThreshold int
	BreakerSleepWindow            int
	BreakerErrorPercentThreshold  int
	BreakerDashboard              bool
	UserField                     string
	AddressField                  string
}

type APIGatewayOptions

type APIGatewayOptions struct {
	ServerOptions

	Connectors  []IAPIConnector
	Middlewares []IAPIMiddleware
	Packers     []IAPIDataPacker
	I18n        IAPIi18n
}

type BaseAPIi18n

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

func (*BaseAPIi18n) Close

func (this *BaseAPIi18n) Close()

func (*BaseAPIi18n) Open

func (this *BaseAPIi18n) Open() bool

type BaseAssetManager

type BaseAssetManager struct {
}

func (*BaseAssetManager) Init

func (this *BaseAssetManager) Init() *herrors.Error

type BaseConnector

type BaseConnector struct {
	Gateway IAPIGateway

	Packer IAPIDataPacker
	// contains filtered or unexported fields
}

func (*BaseConnector) Class

func (this *BaseConnector) Class() string

func (*BaseConnector) Close

func (this *BaseConnector) Close()

func (*BaseConnector) EntityMeta

func (this *BaseConnector) EntityMeta() *EntityMeta

func (*BaseConnector) Name added in v1.1.29

func (this *BaseConnector) Name() string

func (*BaseConnector) Open

func (this *BaseConnector) Open(gw IAPIGateway, ins IAPIConnector) *herrors.Error

func (*BaseConnector) Server

func (this *BaseConnector) Server() IServer

type BaseMiddleware

type BaseMiddleware struct {
	Gateway IAPIGateway
	// contains filtered or unexported fields
}

func (*BaseMiddleware) Class

func (this *BaseMiddleware) Class() string

func (*BaseMiddleware) Close

func (this *BaseMiddleware) Close()

func (*BaseMiddleware) EntityMeta

func (this *BaseMiddleware) EntityMeta() *EntityMeta

func (*BaseMiddleware) HandleIn

func (this *BaseMiddleware) HandleIn(seq uint64, service string, slot string, data htypes.Map) (stop bool, err *herrors.Error)

func (*BaseMiddleware) HandleOut

func (this *BaseMiddleware) HandleOut(seq uint64, service string, slot string, result htypes.Any, e *herrors.Error) (stop bool, err *herrors.Error)

func (*BaseMiddleware) Open

func (this *BaseMiddleware) Open(gw IAPIGateway, ins IAPIMiddleware) *herrors.Error

func (*BaseMiddleware) Server

func (this *BaseMiddleware) Server() IServer

type BasePacker

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

func (*BasePacker) Class

func (this *BasePacker) Class() string

func (*BasePacker) Close

func (this *BasePacker) Close()

func (*BasePacker) EntityMeta

func (this *BasePacker) EntityMeta() *EntityMeta

func (*BasePacker) EntityStub

func (this *BasePacker) EntityStub() *EntityStub

func (*BasePacker) Marshal

func (this *BasePacker) Marshal(data htypes.Any) ([]byte, *herrors.Error)

func (*BasePacker) Open

func (this *BasePacker) Open(gw IAPIGateway, ins IAPIDataPacker) *herrors.Error

func (*BasePacker) Server

func (this *BasePacker) Server() IServer

func (*BasePacker) Unmarshal

func (this *BasePacker) Unmarshal(bytes []byte) (htypes.Any, *herrors.Error)

type BasePlugin

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

func (*BasePlugin) Capability

func (this *BasePlugin) Capability() htypes.Any

func (*BasePlugin) Class

func (this *BasePlugin) Class() string

func (*BasePlugin) Close

func (this *BasePlugin) Close()

func (*BasePlugin) EntityMeta

func (this *BasePlugin) EntityMeta() *EntityMeta

func (*BasePlugin) Open

func (this *BasePlugin) Open(s IServer, ins IPlugin) *herrors.Error

func (*BasePlugin) Server

func (this *BasePlugin) Server() IServer

type BaseRouter

type BaseRouter struct {
	Services map[string]IService
	Entities map[string]IEntity
	// contains filtered or unexported fields
}

func (*BaseRouter) AllEntities

func (this *BaseRouter) AllEntities() []*EntityMeta

func (*BaseRouter) Class

func (this *BaseRouter) Class() string

func (*BaseRouter) Close

func (this *BaseRouter) Close()

func (*BaseRouter) EntityMeta

func (this *BaseRouter) EntityMeta() *EntityMeta

func (*BaseRouter) ManageEntity

func (this *BaseRouter) ManageEntity(mm *EntityMeta, slot string, params htypes.Map) (htypes.Any, *herrors.Error)

func (*BaseRouter) Open

func (this *BaseRouter) Open(s IServer, ins IRouter) *herrors.Error

func (*BaseRouter) ParseEntityMeta

func (this *BaseRouter) ParseEntityMeta(s string) *EntityMeta

func (*BaseRouter) RegisterEntity

func (this *BaseRouter) RegisterEntity(m IEntity) *herrors.Error

func (*BaseRouter) RegisterService

func (this *BaseRouter) RegisterService(s IService) *herrors.Error

func (*BaseRouter) Server

func (this *BaseRouter) Server() IServer

func (*BaseRouter) UnRegisterService

func (this *BaseRouter) UnRegisterService(s IService)

type CallerResponse

type CallerResponse struct {
	Data  interface{}
	Error *herrors.Error
}

type CmdArgs added in v1.1.11

type CmdArgs struct {
	Env string `cli:"e,env" usage:"当前运行环境(dev/test)"`
}

type ConnectorConf

type ConnectorConf struct {
	EntityConfBase

	Lang   string
	Packer string
	Name   string
}

type DefaultAPIi18n

type DefaultAPIi18n struct {
	BaseAPIi18n
	// contains filtered or unexported fields
}

func (*DefaultAPIi18n) Class

func (this *DefaultAPIi18n) Class() string

func (*DefaultAPIi18n) Open

func (this *DefaultAPIi18n) Open() *herrors.Error

func (*DefaultAPIi18n) Translate

func (this *DefaultAPIi18n) Translate(lang string, text string) string

type EndPoint

type EndPoint struct {
	Service string `json:"service"`
	Slot    string `json:"slot"`
}

type EntityConfBase

type EntityConfBase struct {
	Disabled bool
	EID      string
}

func (*EntityConfBase) GetDisabled

func (this *EntityConfBase) GetDisabled() bool

func (*EntityConfBase) GetEID

func (this *EntityConfBase) GetEID() string

func (*EntityConfBase) SetDisabled

func (this *EntityConfBase) SetDisabled(dis bool)

func (*EntityConfBase) SetEID

func (this *EntityConfBase) SetEID(eid string)

type EntityGetter

type EntityGetter func(params htypes.Map) (htypes.Any, *herrors.Error)

type EntityMeta

type EntityMeta struct {
	ServerEID string `json:"server_eid"`
	EID       string `json:"eid"`
	Type      string `json:"type"`
	Class     string `json:"class"`
}

type EntitySetter

type EntitySetter func(params htypes.Map) *herrors.Error

type EntityStub

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

func NewEntityStub

func NewEntityStub(opt *EntityStubOptions) *EntityStub

func (*EntityStub) Manage

func (this *EntityStub) Manage(act string, params htypes.Map) (htypes.Any, *herrors.Error)

type EntityStubOptions

type EntityStubOptions struct {
	Owner             IEntity
	Ping              EntityGetter //联通情况
	GetLoad           EntityGetter //负载情况
	ResetConfig       EntitySetter //恢复设置
	UpdateConfigItems EntitySetter //修改设置
	GetConfig         EntityGetter //获取全部配置
	GetConfigItems    EntityGetter //获取某项配置
}

type FileAssets

type FileAssets struct {
	BaseAssetManager
}

func (*FileAssets) File

func (this *FileAssets) File(p string) ([]byte, *herrors.Error)

type IAPIConnector

type IAPIConnector interface {
	Open(gw IAPIGateway, ins IAPIConnector) *herrors.Error
	Name() string
	Close()
}

type IAPIDataPacker

type IAPIDataPacker interface {
	Open(gw IAPIGateway, ins IAPIDataPacker) *herrors.Error
	Close()
	Marshal(data htypes.Any) ([]byte, *herrors.Error)
	Unmarshal(bytes []byte) (htypes.Any, *herrors.Error)
}

type IAPIGateway

type IAPIGateway interface {
	Start()
	Shutdown()
	Server() IServer
	Router() IRouter
	Packer(name string) IAPIDataPacker
	I18n() IAPIi18n
	PreRequestMiddleware(version string, api string, params htypes.Map) *herrors.Error
	RequestAPI(version string, api string, params htypes.Map) (htypes.Any, *herrors.Error)
	RequestWSAPI(version string, api string, params htypes.Map) (htypes.Any, *herrors.Error)
}

type IAPIMiddleware

type IAPIMiddleware interface {
	Open(gw IAPIGateway, ins IAPIMiddleware) *herrors.Error
	Close()
	HandleIn(seq uint64, version string, api string, data htypes.Map) (stop bool, err *herrors.Error)                      //入口处理
	HandleOut(seq uint64, version string, api string, result htypes.Any, e *herrors.Error) (stop bool, err *herrors.Error) //出口处理
	Type() string
}

type IAPIi18n

type IAPIi18n interface {
	Open() *herrors.Error
	Close()
	Translate(lang string, text string) string
}

type IAssetManager

type IAssetManager interface {
	Init() *herrors.Error
	File(path string) ([]byte, *herrors.Error)
}

type IEntity

type IEntity interface {
	Class() string
	Server() IServer
	Config() IEntityConf

	EntityMeta() *EntityMeta
	EntityStub() *EntityStub
}

type IEntityConf

type IEntityConf interface {
	GetEID() string
	GetDisabled() bool
	SetEID(eid string)
	SetDisabled(dis bool)
}

type IPlugin

type IPlugin interface {
	Open(server IServer, ins IPlugin) *herrors.Error
	Close()
	Capability() htypes.Any
}

type IRouter

type IRouter interface {
	Open(s IServer, ins IRouter) *herrors.Error
	Close()

	//服务相关方法
	RegisterService(s IService) *herrors.Error                                                  //注册服务
	UnRegisterService(s IService)                                                               //注销服务
	RequestService(service string, slot string, params htypes.Map) (htypes.Any, *herrors.Error) //同步请求服务

	// 实体治理相关方法
	AllEntities() []*EntityMeta
	RegisterEntity(m IEntity) *herrors.Error
	ManageEntity(mm *EntityMeta, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
}

type IServer

type IServer interface {
	Start()
	Shutdown()

	Router() IRouter
	Plugin(cls string) IPlugin
	Services() map[string]IService
	Slot(service string, slot string) *Slot
	Assets() IAssetManager

	RegisterService(service IService, options htypes.Any)
	RequestService(service string, slot string, params htypes.Map) (htypes.Any, *herrors.Error)
}

type IService

type IService interface {
	Open(s IServer, instance IService, options htypes.Any) *herrors.Error
	Close()
	Name() string

	//插件依赖申请
	UsePlugin(name string) IPlugin

	//槽相关方法
	Slot(slot string) *Slot

	//服务调用相关方法
	Request(slot string, params htypes.Map) (htypes.Any, *herrors.Error)
}

type ISlotRequest added in v1.1.0

type ISlotRequest interface {
	FromJSON(str string, instance interface{}) *herrors.Error
	FromMap(data htypes.Map, ins interface{}) *herrors.Error
}

type InMiddleware

type InMiddleware struct {
	BaseMiddleware
}

func (*InMiddleware) Type

func (this *InMiddleware) Type() string

type InOutMiddleware

type InOutMiddleware struct {
	BaseMiddleware
}

func (*InOutMiddleware) Type

func (this *InOutMiddleware) Type() string

type MethodCaller

type MethodCaller struct {
	Object  reflect.Value
	Handler reflect.Value
}

type OpenAPI

type OpenAPI struct {
	Version string `json:"version"`
	APIs    []API  `json:"apis"`
}

type OutMiddleware

type OutMiddleware struct {
	BaseMiddleware
}

func (*OutMiddleware) Type

func (this *OutMiddleware) Type() string

type PbServiceRequest

type PbServiceRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Slot                 string   `protobuf:"bytes,2,opt,name=slot,proto3" json:"slot,omitempty"`
	Encoding             string   `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"`
	Params               []byte   `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PbServiceRequest) Descriptor

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

func (*PbServiceRequest) GetEncoding

func (m *PbServiceRequest) GetEncoding() string

func (*PbServiceRequest) GetName

func (m *PbServiceRequest) GetName() string

func (*PbServiceRequest) GetParams

func (m *PbServiceRequest) GetParams() []byte

func (*PbServiceRequest) GetSlot

func (m *PbServiceRequest) GetSlot() string

func (*PbServiceRequest) Marshal

func (m *PbServiceRequest) Marshal() (dAtA []byte, err error)

func (*PbServiceRequest) MarshalTo

func (m *PbServiceRequest) MarshalTo(dAtA []byte) (int, error)

func (*PbServiceRequest) MarshalToSizedBuffer

func (m *PbServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PbServiceRequest) ProtoMessage

func (*PbServiceRequest) ProtoMessage()

func (*PbServiceRequest) Reset

func (m *PbServiceRequest) Reset()

func (*PbServiceRequest) Size

func (m *PbServiceRequest) Size() (n int)

func (*PbServiceRequest) String

func (m *PbServiceRequest) String() string

func (*PbServiceRequest) Unmarshal

func (m *PbServiceRequest) Unmarshal(dAtA []byte) error

func (*PbServiceRequest) XXX_DiscardUnknown

func (m *PbServiceRequest) XXX_DiscardUnknown()

func (*PbServiceRequest) XXX_Marshal

func (m *PbServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PbServiceRequest) XXX_Merge

func (m *PbServiceRequest) XXX_Merge(src proto.Message)

func (*PbServiceRequest) XXX_Size

func (m *PbServiceRequest) XXX_Size() int

func (*PbServiceRequest) XXX_Unmarshal

func (m *PbServiceRequest) XXX_Unmarshal(b []byte) error

type PbServiceResponse

type PbServiceResponse struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PbServiceResponse) Descriptor

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

func (*PbServiceResponse) GetData

func (m *PbServiceResponse) GetData() []byte

func (*PbServiceResponse) GetMessage

func (m *PbServiceResponse) GetMessage() string

func (*PbServiceResponse) GetSuccess

func (m *PbServiceResponse) GetSuccess() bool

func (*PbServiceResponse) Marshal

func (m *PbServiceResponse) Marshal() (dAtA []byte, err error)

func (*PbServiceResponse) MarshalTo

func (m *PbServiceResponse) MarshalTo(dAtA []byte) (int, error)

func (*PbServiceResponse) MarshalToSizedBuffer

func (m *PbServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PbServiceResponse) ProtoMessage

func (*PbServiceResponse) ProtoMessage()

func (*PbServiceResponse) Reset

func (m *PbServiceResponse) Reset()

func (*PbServiceResponse) Size

func (m *PbServiceResponse) Size() (n int)

func (*PbServiceResponse) String

func (m *PbServiceResponse) String() string

func (*PbServiceResponse) Unmarshal

func (m *PbServiceResponse) Unmarshal(dAtA []byte) error

func (*PbServiceResponse) XXX_DiscardUnknown

func (m *PbServiceResponse) XXX_DiscardUnknown()

func (*PbServiceResponse) XXX_Marshal

func (m *PbServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PbServiceResponse) XXX_Merge

func (m *PbServiceResponse) XXX_Merge(src proto.Message)

func (*PbServiceResponse) XXX_Size

func (m *PbServiceResponse) XXX_Size() int

func (*PbServiceResponse) XXX_Unmarshal

func (m *PbServiceResponse) XXX_Unmarshal(b []byte) error

type PluginConf

type PluginConf struct {
	EntityConfBase
}

type RpcRequestArguments

type RpcRequestArguments struct {
	Service string
	Slot    string
	Params  map[string]interface{}
}

type Server

type Server struct {
	EntityConfBase

	MaxProcs  int
	PprofPort int
}

type ServerImplement

type ServerImplement struct {
	Instance IServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opt *ServerOptions, args ...htypes.Any) *ServerImplement

func (*ServerImplement) Assets

func (this *ServerImplement) Assets() IAssetManager

func (*ServerImplement) Class

func (this *ServerImplement) Class() string

func (*ServerImplement) Config

func (this *ServerImplement) Config() IEntityConf

func (*ServerImplement) EntityMeta

func (this *ServerImplement) EntityMeta() *EntityMeta

func (*ServerImplement) EntityStub

func (this *ServerImplement) EntityStub() *EntityStub

func (*ServerImplement) Plugin

func (this *ServerImplement) Plugin(cls string) IPlugin

func (*ServerImplement) RegisterService

func (this *ServerImplement) RegisterService(service IService, options htypes.Any)

func (*ServerImplement) RequestService

func (this *ServerImplement) RequestService(service string, slot string, params htypes.Map) (ret htypes.Any, err *herrors.Error)

func (*ServerImplement) Router

func (this *ServerImplement) Router() IRouter

func (*ServerImplement) Server

func (this *ServerImplement) Server() IServer

func (*ServerImplement) Services

func (this *ServerImplement) Services() map[string]IService

func (*ServerImplement) Shutdown

func (this *ServerImplement) Shutdown()

func (*ServerImplement) Slot

func (this *ServerImplement) Slot(service string, slot string) *Slot

func (*ServerImplement) Start

func (this *ServerImplement) Start()

type ServerOptions

type ServerOptions struct {
	Router        IRouter
	Plugins       []IPlugin
	AssetsManager IAssetManager
}

type Service

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

func (*Service) BoolTypeTransform added in v1.1.18

func (this *Service) BoolTypeTransform(params *htypes.Map)

func (*Service) Class

func (this *Service) Class() string

func (*Service) Close

func (this *Service) Close()

func (*Service) EntityMeta

func (this *Service) EntityMeta() *EntityMeta

func (*Service) LimitedSlots

func (this *Service) LimitedSlots() []string

func (*Service) Name

func (this *Service) Name() string

func (*Service) Open

func (this *Service) Open(s IServer, instance IService, options htypes.Any) *herrors.Error

func (*Service) Request

func (this *Service) Request(slot string, params htypes.Map) (htypes.Any, *herrors.Error)

func (*Service) Response

func (this *Service) Response(res *SlotResponse, data htypes.Any, err *herrors.Error)

func (*Service) Server

func (this *Service) Server() IServer

func (*Service) Slot

func (this *Service) Slot(slot string) *Slot

func (*Service) Slots added in v1.1.0

func (this *Service) Slots(req *SlotsRequest, res *SlotResponse)

func (*Service) UsePlugin

func (this *Service) UsePlugin(name string) IPlugin

type ServiceConf

type ServiceConf struct {
	EntityConfBase

	Name         string
	LimitedSlots string
}

type Slot

type Slot struct {
	Name        string                    `json:"name"`
	Params      map[string]*SlotParameter `json:"params"`
	ReqInstance htypes.Any
}

type SlotParameter added in v1.1.0

type SlotParameter struct {
	Name            string
	Require         bool
	InsensitiveCase bool
	Validate        string
	Type            string
}

type SlotRequestBase added in v1.1.0

type SlotRequestBase struct {
}

func (*SlotRequestBase) FromJSON added in v1.1.0

func (this *SlotRequestBase) FromJSON(str string, instance interface{}) *herrors.Error

func (*SlotRequestBase) FromMap added in v1.1.0

func (this *SlotRequestBase) FromMap(data htypes.Map, ins interface{}) *herrors.Error

type SlotResponse

type SlotResponse struct {
	Error *herrors.Error
	Data  interface{}
}

type SlotWsRequestBase added in v1.1.29

type SlotWsRequestBase struct {
	SlotRequestBase

	WsID   *string `json:"WsID"`
	INITWS *bool   `json:"INITWS"`
	BREAK  *bool   `json:"BREAK"`
}

type SlotsRequest added in v1.1.0

type SlotsRequest struct {
	SlotRequestBase
}

Jump to

Keyboard shortcuts

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