contexts

package
v0.0.0-...-77817de Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertRepoContext

type CertRepoContext struct {
	Parent *GitRepoContext

	// files
	DomainListFile  afs.Path // at '.git/../acme.config'
	LocalConfigFile afs.Path // at '.git/../acme-local.config'
	MainConfigFile  afs.Path // at '.git/../acme-domains.list'

	// config
	// ConfigProperties properties.Table
	MainConfig  *config.VO
	LocalConfig *config.VO
	MixedConfig *config.VO

	// domains
	DomainList []*DomainListItem
	Domains    map[string]*DomainListItem

	// time
	Now             time.Time
	SessionTime     time.Time
	SessionInterval time.Duration
}

CertRepoContext 包含关于一个证书仓库的上下文信息

func (*CertRepoContext) LoadConfig

func (inst *CertRepoContext) LoadConfig() error

LoadConfig ...

func (*CertRepoContext) LoadDomainList

func (inst *CertRepoContext) LoadDomainList() error

LoadDomainList ...

type DomainContext

type DomainContext struct {
	Parent *CertRepoContext

	DomainName string

	DomainDirectory afs.Path

	CurrentCertFile afs.Path
	LatestCertFile  afs.Path
}

DomainContext 包含关于一个域名的上下文信息

type DomainListItem

type DomainListItem struct {
	Raw     string
	Domain  string
	Enabled bool
}

DomainListItem ...

type GitRepoContext

type GitRepoContext struct {
	Parent   context.Context
	Layout   repositories.Layout
	WD       afs.Path
	Worktree afs.Path
}

GitRepoContext 包含关于一个 git 仓库的上下文信息

type Service

type Service interface {
	NewGitRepoContext(c context.Context) (*GitRepoContext, error)

	NewCertRepoContext(c context.Context) (*CertRepoContext, error)

	NewDomainContext(parent *CertRepoContext, domain string) (*DomainContext, error)
}

Service 提供一组创建上下文的接口

Jump to

Keyboard shortcuts

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