2019-01-30 17:33:00 +01:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2019-05-11 12:21:34 +02:00
|
|
|
package structs
|
2019-01-30 17:33:00 +01:00
|
|
|
|
|
|
|
// Tag represents a repository tag
|
|
|
|
type Tag struct {
|
2019-06-08 16:31:11 +02:00
|
|
|
Name string `json:"name"`
|
2021-06-17 18:04:10 +02:00
|
|
|
Message string `json:"message"`
|
2019-06-08 16:31:11 +02:00
|
|
|
ID string `json:"id"`
|
|
|
|
Commit *CommitMeta `json:"commit"`
|
|
|
|
ZipballURL string `json:"zipball_url"`
|
|
|
|
TarballURL string `json:"tarball_url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnnotatedTag represents an annotated tag
|
|
|
|
type AnnotatedTag struct {
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
SHA string `json:"sha"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
Tagger *CommitUser `json:"tagger"`
|
|
|
|
Object *AnnotatedTagObject `json:"object"`
|
|
|
|
Verification *PayloadCommitVerification `json:"verification"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnnotatedTagObject contains meta information of the tag object
|
|
|
|
type AnnotatedTagObject struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
SHA string `json:"sha"`
|
2019-01-30 17:33:00 +01:00
|
|
|
}
|
2021-06-17 18:04:10 +02:00
|
|
|
|
|
|
|
// CreateTagOption options when creating a tag
|
|
|
|
type CreateTagOption struct {
|
|
|
|
// required: true
|
|
|
|
TagName string `json:"tag_name" binding:"Required"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
Target string `json:"target"`
|
|
|
|
}
|