ac

package
v0.0.0-...-1485484 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: BSD-3-Clause Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInfoFile

func GetInfoFile(p string) (interface{}, error)

Types

type ACContainer

type ACContainer struct {
	BaseURL string `json:"baseURL"`
	Id      string `json:"id"`
	Secret  string `json:"secret"`
	Dir     string `json:"dir"`
}

type ACService

type ACService struct {
	Unit      interface{} `json:"unit"`
	Container interface{} `json:"container"`
	Control   string      `json:"control"`
	// contains filtered or unexported fields
}

func (*ACService) Config

func (s *ACService) Config() interface{}

* * 服务配置 *

func (*ACService) Name

func (s *ACService) Name() string

* * 服务名称 *

func (*ACService) OnInit

func (s *ACService) OnInit(ctx micro.Context) error

* * 初始化服务 *

func (*ACService) OnValid

func (s *ACService) OnValid(ctx micro.Context) error

* * 校验服务是否可用 *

func (*ACService) Recycle

func (s *ACService) Recycle()

type Container

type Container interface {
	GetPackage(ctx micro.Context, appid string, ver string, ability string) (Package, error)
}

func NewACContainer

func NewACContainer(config interface{}) Container

type HttpResponse

type HttpResponse struct {
	Code    int               `json:"code"`
	Headers map[string]string `json:"headers"`
	Body    string            `json:"body"`
}

func (*HttpResponse) Error

func (r *HttpResponse) Error() string

func (*HttpResponse) String

func (r *HttpResponse) String() string

type Package

type Package interface {
	PackageInfo
	Dir() string // 应用包目录
}

func NewDirPackage

func NewDirPackage(dir string) (Package, error)

func NewPackage

func NewPackage(info PackageInfo, dir string) Package

type PackageInfo

type PackageInfo interface {
	Key() string
	Appid() string     // 应用ID
	Ver() string       // 应用版本
	Ability() []string // 应用包能力
	Info() interface{} // 应用包信息
}

func NewPackageInfo

func NewPackageInfo(info interface{}) (PackageInfo, error)

Jump to

Keyboard shortcuts

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