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 ¶
func (*Cache) ParseCache ¶
func (cache *Cache) ParseCache(c *caddy.Controller) error
ParseCache parses the txtdirect config for gomods cache
type Config ¶
func (*Config) ParseGomods ¶
func (conf *Config) ParseGomods(c *caddy.Controller) error
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 { Next httpserver.Handler Config Config }
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