core

package
v0.0.0-...-047fe50 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apisix

type Apisix struct {
	// 端点
	Endpoint string `json:"endpoint,omitempty"`
	// 前缀
	Prefix string `default:"apisix/admin" json:"prefix,omitempty"`
	// 授权
	Key string `json:"key,omitempty" validate:"required"`
	// 接口
	Api string `default:"ssls" json:"api,omitempty"`
}

func (*Apisix) Id

func (a *Apisix) Id(id string) string

func (*Apisix) Url

func (a *Apisix) Url() string

type Certificate

type Certificate struct {
	// 标题
	Title string `json:"title,omitempty" validate:"required"`
	// 域名
	Domain string `json:"domain,omitempty" validate:"required_without=Domains"`
	// 域名列表
	Domains []string `json:"domains,omitempty" validate:"required_without=Domain"`
	// 类型
	Type string `default:"dp" json:"type,omitempty"`

	// 用于内部使用,确定一个证书的后续操作标识
	Id string
}

func (*Certificate) Cert

func (c *Certificate) Cert() string

func (*Certificate) Chain

func (c *Certificate) Chain() string

func (*Certificate) Invalidate

func (c *Certificate) Invalidate(chain string) (invalidate bool, err error)

func (*Certificate) Key

func (c *Certificate) Key() string

func (*Certificate) Load

func (c *Certificate) Load(loader Loader) (err error)

func (*Certificate) Match

func (c *Certificate) Match(check *Domain) (matched bool)

func (*Certificate) SniKey

func (c *Certificate) SniKey() key.Sni

type Chuangcache

type Chuangcache struct {
	Ak string `json:"ak,omitempty"`
	Sk string `json:"sk,omitempty"`
}

type Domain

type Domain struct {
	Id   string
	Name string
	Type DomainType
}

func (*Domain) TencentType

func (d *Domain) TencentType() *string

type DomainType

type DomainType uint8
const (
	DomainTypeCdn DomainType = iota + 1
	DomainTypeGateway
)

type Loader

type Loader interface {
	Key(key string)

	Chain(chain string)
}

type Record

type Record struct {
	Id string
}

type ServerCertificate

type ServerCertificate struct {
	Id    string
	Title string
}

type Setter

type Setter func(content string)

type StatusCoder

type StatusCoder interface {
	Code() int
	Message() string
}

type Tencent

type Tencent struct {
	Id  string `json:"id,omitempty"`
	Key string `json:"key,omitempty"`
}

type Token

type Token struct {
	Token   string
	Expired time.Time
}

func (*Token) Validate

func (t *Token) Validate() bool

type TokenSetter

type TokenSetter interface {
	Token(token string) TokenSetter
}

Jump to

Keyboard shortcuts

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