Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLink ¶
func CreateLink(c *gitlab.Client, projectID, tagName string, asset *ReleaseAsset) (*gitlab.ReleaseLink, bool, error)
Types ¶
type ConflictDirectAssetPathError ¶ added in v1.40.0
type ConflictDirectAssetPathError struct {
// contains filtered or unexported fields
}
ConflictDirectAssetPathError is returned when both direct_asset_path and the deprecated filepath as specified for an asset link.
func (*ConflictDirectAssetPathError) Error ¶ added in v1.40.0
func (e *ConflictDirectAssetPathError) Error() string
type Context ¶
type Context struct {
Client *gitlab.Client
IO *iostreams.IOStreams
AssetFiles []*ReleaseFile
AssetsLinks []*ReleaseAsset
}
func (*Context) CreateReleaseAssetFromProjectFile ¶ added in v1.46.0
func (c *Context) CreateReleaseAssetFromProjectFile(releaseFile *ReleaseFile, projectFile *gitlab.ProjectMarkdownUploadedFile) *ReleaseAsset
CreateReleaseAssetFromProjectFile creates a ReleaseAsset from a ProjectFile and the metadata from a ReleaseFile. See [https://docs.gitlab.com/api/projects/#upload-a-file](https://docs.gitlab.com/api/project_markdown_uploads/)
func (*Context) CreateReleaseAssetLinks ¶
func (*Context) UploadFiles ¶
UploadFiles uploads a file into a release repository.
type ReleaseAsset ¶
type ReleaseAsset struct {
Name *string `json:"name,omitempty"`
URL *string `json:"url,omitempty"`
// Deprecated FilePath use DirectAssetPath instead.
FilePath *string `json:"filepath,omitempty"`
DirectAssetPath *string `json:"direct_asset_path,omitempty"`
LinkType *gitlab.LinkTypeValue `json:"link_type,omitempty"`
}
type ReleaseFile ¶
type ReleaseFile struct {
Open func() (io.ReadCloser, error)
Name string
Label string
Path string
Type *gitlab.LinkTypeValue
}
Click to show internal directories.
Click to hide internal directories.