Documentation ¶
Index ¶
- Constants
- Variables
- func GlobalFlag() []cli.Flag
- func HideGlobalFlag() []cli.Flag
- type FuncGiteaPublishGolang
- type GiteaPackageInfo
- type GiteaPublishGolang
- func (p *GiteaPublishGolang) Exec() error
- func (p *GiteaPublishGolang) GetWoodPeckerInfo() wd_info.WoodpeckerInfo
- func (p *GiteaPublishGolang) OnlyArgsCheck()
- func (p *GiteaPublishGolang) SetWoodpeckerInfo(info wd_info.WoodpeckerInfo)
- func (p *GiteaPublishGolang) ShortInfo() wd_short_info.WoodpeckerInfoShort
- type GiteaPublishGolangClient
- type GoModZip
- func (z *GoModZip) CreateGoModeZipPackageFile(targetPath string, version string) error
- func (z *GoModZip) GetGoModPackageName() string
- func (z *GoModZip) GetGoModeGoVersion() string
- func (z *GoModZip) GetModFile() *modfile.File
- func (z *GoModZip) GetVersionName() string
- func (z *GoModZip) GetZipPackageFilePath() (string, error)
- type GoModZipFunc
- type PublishPackageGoInfo
- type Settings
Constants ¶
View Source
const ( CliNameGiteaPublishGolangApiKey = "settings.gitea-publish-golang-api-key" EnvGiteaPublishGolangApiKey = "PLUGIN_GITEA_PUBLISH_GOLANG_API_KEY" CliNameGiteaPubGolangBaseUrl = "settings.gitea-publish-golang-base-url" EnvGiteaPubGolangBaseUrl = "PLUGIN_GITEA_PUBLISH_GOLANG_BASE_URL" CliNameGiteaPubGolangInsecure = "settings.gitea-publish-golang-insecure" EnvGiteaPubGolangInsecure = "PLUGIN_GITEA_PUBLISH_GOLANG_INSECURE" CliNameGiteaPubGolangDryRun = "settings.gitea-publish-golang-dry-run" EnvGiteaPubGolangDryRun = "PLUGIN_GITEA_PUBLISH_GOLANG_DRY_RUN" CliNameGiteaPubGolangPathGo = "settings.gitea-publish-golang-path-go" EnvGiteaPubGolangPathGo = "PLUGIN_GITEA_PUBLISH_GOLANG_PATH_GO" CliNameGiteaPubGolangRemovePaths = "settings.gitea-publish-golang-remove-paths" EnvGiteaPubGolangRemovePaths = "PLUGIN_GITEA_PUBLISH_GOLANG_REMOVE_PATHS" CliNameGiteaPubGolangUpdateResultRootPath = "settings.gitea-publish-golang-update-result-root-path" EnvGiteaPubGolangUpdateResultRootPath = "PLUGIN_GITEA_PUBLISH_GOLANG_UPDATE_RESULT_ROOT_PATH" CliNameGiteaPubGolangUpdateResultFileName = "settings.gitea-publish-golang-update-result-file-name" EnvGiteaPubGolangUpdateResultFileName = "PLUGIN_GITEA_PUBLISH_GOLANG_UPDATE_RESULT_FILE_NAME" )
View Source
const ( CliNameGiteaPubGolangTimeoutSecond = "settings.gitea-publish-golang-timeout-second" EvnGiteaPubGolangTimeoutSecond = "PLUGIN_GITEA_PUBLISH_GOLANG_TIMEOUT_SECOND" )
Variables ¶
View Source
var (
ErrMissingTag = fmt.Errorf("NewGiteaPublishGolangClientByWoodpeckerShort missing tag, please check now in tag build")
)
View Source
var (
ErrPackageNotExist = fmt.Errorf("RemotePackageGoFetch not exist, code 404")
)
Functions ¶
func HideGlobalFlag ¶
func HideGlobalFlag() []cli.Flag
Types ¶
type FuncGiteaPublishGolang ¶
type FuncGiteaPublishGolang interface { ShortInfo() wd_short_info.WoodpeckerInfoShort SetWoodpeckerInfo(info wd_info.WoodpeckerInfo) GetWoodPeckerInfo() wd_info.WoodpeckerInfo OnlyArgsCheck() Exec() error // contains filtered or unexported methods }
type GiteaPackageInfo ¶
type GiteaPublishGolang ¶
type GiteaPublishGolang struct { Name string Version string Settings Settings FuncPlugin FuncGiteaPublishGolang `json:"-"` // contains filtered or unexported fields }
GiteaPublishGolang gitea_publish_golang all config
func BindCliFlags ¶
func BindCliFlags(c *cli.Context, debug bool, cliName, cliVersion string, wdInfo *wd_info.WoodpeckerInfo, rootPath, stepsTransferPath string, stepsOutDisable bool, ) (*GiteaPublishGolang, error)
func (*GiteaPublishGolang) Exec ¶
func (p *GiteaPublishGolang) Exec() error
func (*GiteaPublishGolang) GetWoodPeckerInfo ¶
func (p *GiteaPublishGolang) GetWoodPeckerInfo() wd_info.WoodpeckerInfo
func (*GiteaPublishGolang) OnlyArgsCheck ¶
func (p *GiteaPublishGolang) OnlyArgsCheck()
func (*GiteaPublishGolang) SetWoodpeckerInfo ¶
func (p *GiteaPublishGolang) SetWoodpeckerInfo(info wd_info.WoodpeckerInfo)
SetWoodpeckerInfo also change ShortInfo() return
func (*GiteaPublishGolang) ShortInfo ¶
func (p *GiteaPublishGolang) ShortInfo() wd_short_info.WoodpeckerInfoShort
type GiteaPublishGolangClient ¶
type GiteaPublishGolangClient interface { LocalPackageGoFetch(goModRootPath string) error RemotePackageGoFetch(version string) (*GiteaPackageInfo, error) CreateGoModZip(version string, zipRootPath string, goModRootPath string, removePath []string) error PackageGoUpload() (*PublishPackageGoInfo, error) }
func NewGiteaPublishGolangClientByWoodpeckerShort ¶
func NewGiteaPublishGolangClientByWoodpeckerShort(info wd_short_info.WoodpeckerInfoShort, config Settings) (GiteaPublishGolangClient, error)
NewGiteaPublishGolangClientByWoodpeckerShort create gitea publish golang client by wd_short_info.WoodpeckerInfoShort
type GoModZip ¶
type GoModZip struct { GoModZipFunc GoModZipFunc `json:"-"` // contains filtered or unexported fields }
func NewGoModZip ¶
func (*GoModZip) CreateGoModeZipPackageFile ¶
func (*GoModZip) GetGoModPackageName ¶
func (*GoModZip) GetGoModeGoVersion ¶
func (*GoModZip) GetModFile ¶
func (*GoModZip) GetVersionName ¶
func (*GoModZip) GetZipPackageFilePath ¶
type GoModZipFunc ¶
type PublishPackageGoInfo ¶
type Settings ¶
type Settings struct { Debug bool TimeoutSecond uint StepsTransferPath string StepsOutDisable bool RootPath string DryRun bool GiteaApiKey string GiteaBaseUrl string GiteaInsecure bool GiteaTimeoutSecond uint PublishPackageGoPath string PublishRemovePaths []string ResultUploadRootPath string ResultUploadFileName string // PublishPackageVersion is the version to publish this by check args success will init by tag or latest PublishPackageVersion string // ZipTargetRootPath is the root path of zip target with check args success will init by // tempDir/woodpecker-gitea-publisher-golang/{repo-hostname}/{owner}/{repo}/{build_number} ZipTargetRootPath string // contains filtered or unexported fields }
Settings gitea_publish_golang private config
Click to show internal directories.
Click to hide internal directories.