Documentation ¶
Index ¶
Constants ¶
const ( // DefaultGomodsCacheType is the default cache mode DefaultGomodsCacheType = "tmp" // DefaultGomodsWorkers is the default number of parallel workers DefaultGomodsWorkers = 1 )
Variables ¶
var DefaultGoBinaryPath = os.Getenv("GOROOT") + "/bin/go"
DefaultGoBinaryPath is the default Golang binary installed on the machine
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Config ¶
type Config struct { GoBinary string `json:"gobinary,omitempty"` Workers int `json:"workers,omitempty"` Cache Cache `json:"cache,omitempty"` // contains filtered or unexported fields }
func (*Config) ParseGomods ¶
ParseGomods parses the txtdirect config for gomods
func (*Config) Serve ¶
Serve handles the incoming requests and serves the module files like .mod and etc
func (*Config) SetDefaults ¶
func (conf *Config) SetDefaults()
SetDefaults sets the default values for gomods config if the fields are empty
type Gomods ¶
type Gomods struct {
Config Config
}
func (Gomods) CaddyModule ¶ added in v0.2.0
func (Gomods) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
type Module ¶
Module is the struct that keeps a Go module's data
func (*Module) DecodeImportPath ¶
DecodeImportPath decodes the module's import path. For more information check https://github.com/golang/go/blob/master/src/cmd/go/internal/module/module.go#L375-L433
func (*Module) ParseImportPath ¶
ParseImportPath parses the request path and exports the module's import path, module's version and file extension
type ModuleHandler ¶
type ModuleHandler interface {
// contains filtered or unexported methods
}
ModuleHandler is the interface that keeps the module handlers for fething and caching