app

package
v0.15.12 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.9.0

func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

Create 创建驱动实例

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

NewFactory 创建service_http驱动工厂

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册service_http驱动工厂

Types

type Additional

type Additional struct {
	Key      string            `json:"key" label:"参数名"`
	Value    string            `json:"value" label:"参数值"`
	Position string            `json:"position" label:"参数位置" enum:"header,query,body"`
	Conflict string            `json:"conflict" label:"参数存在替换规则" enum:"convert,origin,error"`
	Labels   map[string]string `json:"labels"`
}

type Auth

type Auth struct {
	Type      string                    `json:"type" label:"鉴权类型"`
	TokenName string                    `json:"token_name" label:"token名称"`
	Position  string                    `json:"position" label:"token位置" enum:"header,query,body"`
	Config    *application.BaseConfig   `json:"config" label:"配置信息" eotype:"object"`
	Users     []*application.BaseConfig `json:"users" label:"用户列表"`
}

func (*Auth) Reset

func (a *Auth) Reset(originVal reflect.Value, targetVal reflect.Value, variables eosc.IVariable) ([]string, error)

type Config

type Config struct {
	Anonymous  bool              `json:"anonymous" label:"匿名" `
	Disable    bool              `json:"disable" label:"是否禁用"`
	Additional []*Additional     `json:"additional" label:"额外参数"`
	Auth       []*Auth           `json:"auth" label:"鉴权列表" eotype:"interface" switch:"anonymous===false"`
	Labels     map[string]string `json:"labels" label:"应用标签"`
}

Config App驱动配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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