golang

package
v2.23.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 35 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// MaxZipFile is the maximum size in bytes of a module zip file. The
	// go command will report an error if either the zip file or its extracted
	// content is larger than this.
	MaxZipFile = 500 << 20

	// MaxGoMod is the maximum size in bytes of a go.mod file within a
	// module zip file.
	MaxGoMod = 16 << 20

	// MaxLICENSE is the maximum size in bytes of a LICENSE file within a
	// module zip file.
	MaxLICENSE = 16 << 20
)

Variables

This section is empty.

Functions

func Create added in v2.5.0

func Create(w io.Writer, m module.Version, files []File) (err error)

Create builds a zip archive for module m from an abstract list of files and writes it to w.

Create verifies the restrictions described in the package documentation and should not produce an archive that Unzip cannot extract. Create does not include files in the output archive if they don't belong in the module zip. In particular, Create will not include files in modules found in subdirectories, most files in vendor directories, or irregular files (such as symbolic links) in the output archive.

Types

type File added in v2.5.0

type File interface {
	// Path returns a clean slash-separated relative path from the module root
	// directory to the file.
	Path() string

	// Lstat returns information about the file. If the file is a symbolic link,
	// Lstat returns information about the link itself, not the file it points to.
	Lstat() (os.FileInfo, error)

	// Open provides access to the data within a regular file. Open may return
	// an error if called on a directory or symbolic link.
	Open() (io.ReadCloser, error)
}

File provides an abstraction for a file in a directory, zip, or anything else that looks like a file.

type GoCommand

type GoCommand struct {
	// contains filtered or unexported fields
}

func NewGoCommand

func NewGoCommand() *GoCommand

func (*GoCommand) CommandName

func (gc *GoCommand) CommandName() string

func (*GoCommand) Run

func (gc *GoCommand) Run() error

func (*GoCommand) ServerDetails

func (gc *GoCommand) ServerDetails() (*config.ServerDetails, error)

func (*GoCommand) SetBuildConfiguration

func (gc *GoCommand) SetBuildConfiguration(buildConfiguration *utils.BuildConfiguration) *GoCommand

func (*GoCommand) SetConfigFilePath

func (gc *GoCommand) SetConfigFilePath(configFilePath string) *GoCommand

func (*GoCommand) SetDeployerParams

func (gc *GoCommand) SetDeployerParams(deployerParams *utils.RepositoryConfig) *GoCommand

func (*GoCommand) SetGoArg

func (gc *GoCommand) SetGoArg(goArg []string) *GoCommand

func (*GoCommand) SetResolverParams

func (gc *GoCommand) SetResolverParams(resolverParams *utils.RepositoryConfig) *GoCommand

type GoPublishCommand

type GoPublishCommand struct {
	*GoPublishCommandArgs
	// contains filtered or unexported fields
}

func NewGoPublishCommand

func NewGoPublishCommand() *GoPublishCommand

func (*GoPublishCommand) CommandName

func (gpc *GoPublishCommand) CommandName() string

func (*GoPublishCommand) Run

func (gpc *GoPublishCommand) Run() error

func (*GoPublishCommand) SetConfigFilePath

func (gpc *GoPublishCommand) SetConfigFilePath(configFilePath string) *GoPublishCommand

type GoPublishCommandArgs

type GoPublishCommandArgs struct {
	utils.RepositoryConfig
	// contains filtered or unexported fields
}

func (*GoPublishCommandArgs) IsDetailedSummary

func (gpc *GoPublishCommandArgs) IsDetailedSummary() bool

func (*GoPublishCommandArgs) Result

func (gpc *GoPublishCommandArgs) Result() *commandutils.Result

func (*GoPublishCommandArgs) SetBuildConfiguration

func (gpc *GoPublishCommandArgs) SetBuildConfiguration(buildConfiguration *utils.BuildConfiguration) *GoPublishCommandArgs

func (*GoPublishCommandArgs) SetDetailedSummary

func (gpc *GoPublishCommandArgs) SetDetailedSummary(detailedSummary bool) *GoPublishCommandArgs

func (*GoPublishCommandArgs) SetVersion

func (gpc *GoPublishCommandArgs) SetVersion(version string) *GoPublishCommandArgs

type PackageVersionResponseContent added in v2.7.4

type PackageVersionResponseContent struct {
	Version string `json:"Version,omitempty"`
}

Jump to

Keyboard shortcuts

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