Documentation ¶
Index ¶
- Constants
- Variables
- func Load(filename string, data interface{}, validation bool) error
- func NewCmpCompareOptions(f Interface) cmp.Options
- func NewCmpOptions(f Interface) cmp.Options
- func RepositoryDirname(name string) string
- func Store(filename string, data interface{}) error
- type Comment
- type Common
- func (c *Common) Clone() Interface
- func (c *Common) GetCmpIgnoreFields() []string
- func (c *Common) GetComparers() []Comparer
- func (c *Common) GetID() string
- func (c *Common) GetName() string
- func (c *Common) GetReferences() References
- func (c *Common) IsNil() bool
- func (c *Common) SetID(id string)
- func (c *Common) ToReference() *Reference
- type Comparer
- type DownloadFuncType
- type Forge
- type Interface
- type Issue
- type Label
- type Milestone
- type Organization
- type Project
- type PullRequest
- type PullRequestBranch
- type PullRequestFetchFunc
- type Reaction
- type Reference
- func (r *Reference) Get() string
- func (r *Reference) GetID() string
- func (r *Reference) GetIDAsInt() int64
- func (r *Reference) GetIDAsString() string
- func (r *Reference) IsNil() bool
- func (r Reference) MarshalJSON() ([]byte, error)
- func (r *Reference) Set(reference string)
- func (r *Reference) SetID(id string)
- func (r *Reference) UnmarshalJSON(b []byte) error
- type ReferenceInterface
- type References
- type Release
- type ReleaseAsset
- type Repository
- type Review
- type ReviewComment
- type Topic
- type User
Constants ¶
View Source
const ( RepositoryNameDefault = "vcs" RepositoryNameWiki = "vcs.wiki" )
View Source
const ( ResourceAsset = "asset" ResourceAssets = "assets" ResourceComment = "comment" ResourceComments = "comments" ResourceIssue = "issue" ResourceIssues = "issues" ResourceLabel = "label" ResourceLabels = "labels" ResourceMilestone = "milestone" ResourceMilestones = "milestones" ResourceOrganization = "organization" ResourceOrganizations = "organizations" ResourceProject = "project" ResourceProjects = "projects" ResourcePullRequest = "pull_request" ResourcePullRequests = "pull_requests" ResourceReaction = "reaction" ResourceReactions = "reactions" ResourceRelease = "release" ResourceReleases = "releases" ResourceRepository = "repository" ResourceRepositories = "repositories" ResourceReview = "review" ResourceReviews = "reviews" ResourceReviewComment = "reviewcomment" ResourceReviewComments = "reviewcomments" ResourceTopic = "topic" ResourceTopics = "topics" ResourceUser = "user" ResourceUsers = "users" ResourceForge = "forge" )
View Source
const ( ReviewStatePending = "PENDING" ReviewStateApproved = "APPROVED" ReviewStateChangesRequested = "CHANGES_REQUESTED" ReviewStateCommented = "COMMENTED" ReviewStateRequestReview = "REQUEST_REVIEW" ReviewStateUnknown = "" )
Variables ¶
View Source
var Nil = &Common{}
View Source
var RepositoryNames = []string{RepositoryNameDefault}
Functions ¶
func NewCmpCompareOptions ¶
func NewCmpOptions ¶
func RepositoryDirname ¶
Types ¶
type Comment ¶
type Comment struct { Common PosterID *Reference `json:"poster_id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Content string `json:"content"` }
func (Comment) GetCmpIgnoreFields ¶
func (*Comment) GetReferences ¶
func (o *Comment) GetReferences() References
type Common ¶
type Common struct {
Index Reference `json:"index"`
}
func (*Common) GetCmpIgnoreFields ¶
func (*Common) GetComparers ¶
func (*Common) GetReferences ¶
func (c *Common) GetReferences() References
func (*Common) ToReference ¶
type DownloadFuncType ¶
type DownloadFuncType func() io.ReadCloser
type Forge ¶
func (Forge) GetCmpIgnoreFields ¶
type Interface ¶
type Issue ¶
type Issue struct { Common PosterID *Reference `json:"poster_id"` Assignees []*Reference `json:"assignees"` Labels []*Reference `json:"labels"` Title string `json:"title"` Content string `json:"content"` Milestone *Reference `json:"milestone"` State string `json:"state"` // closed, open IsLocked bool `json:"is_locked"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Closed *time.Time `json:"closed"` Ref string `json:"ref"` }
func (Issue) GetCmpIgnoreFields ¶
func (*Issue) GetReferences ¶
func (o *Issue) GetReferences() References
type Label ¶
type Milestone ¶
type Milestone struct { Common Title string `json:"title"` Description string `json:"description"` Deadline *time.Time `json:"deadline"` Created time.Time `json:"created"` Updated *time.Time `json:"updated"` Closed *time.Time `json:"closed"` State string `json:"state"` // open, closed }
func (Milestone) GetCmpIgnoreFields ¶
type Organization ¶
func (*Organization) Clone ¶
func (o *Organization) Clone() Interface
func (*Organization) GetName ¶
func (o *Organization) GetName() string
type Project ¶
type Project struct { Common Name string `json:"name"` IsPrivate bool `json:"is_private"` IsMirror bool `json:"is_mirror"` Description string `json:"description"` DefaultBranch string `json:"default_branch"` Forked *Reference `json:"forked"` HasWiki bool `json:"has_wiki"` Topics []*Reference `json:"topics"` }
func (*Project) GetReferences ¶
func (o *Project) GetReferences() References
type PullRequest ¶
type PullRequest struct { Common PosterID *Reference `json:"poster_id"` Title string `json:"title"` Content string `json:"content"` Milestone *Reference `json:"milestone"` State string `json:"state"` // closed, open IsLocked bool `json:"is_locked"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Closed *time.Time `json:"closed"` Merged bool `json:"merged"` MergedTime *time.Time `json:"merged_time"` MergeCommitSHA string `json:"merged_commit_sha"` Head PullRequestBranch `json:"head"` Base PullRequestBranch `json:"base"` FetchFunc PullRequestFetchFunc `json:"-"` }
func (*PullRequest) Clone ¶
func (o *PullRequest) Clone() Interface
func (PullRequest) GetCmpIgnoreFields ¶
func (o PullRequest) GetCmpIgnoreFields() []string
func (PullRequest) GetComparers ¶
func (o PullRequest) GetComparers() []Comparer
func (*PullRequest) GetReferences ¶
func (o *PullRequest) GetReferences() References
func (*PullRequest) IsForkPullRequest ¶
func (o *PullRequest) IsForkPullRequest() bool
type PullRequestBranch ¶
type PullRequestBranch struct { Ref string `json:"ref"` SHA string `json:"sha"` OwnerName string `json:"owner_name"` RepoName string `json:"repo_name"` }
func (PullRequestBranch) RepoPath ¶
func (o PullRequestBranch) RepoPath() string
type PullRequestFetchFunc ¶
type Reaction ¶
func (*Reaction) GetReferences ¶
func (o *Reaction) GetReferences() References
type Reference ¶
type Reference struct {
ID string
}
func NewReference ¶
func (*Reference) GetIDAsInt ¶
func (*Reference) GetIDAsString ¶
func (Reference) MarshalJSON ¶
func (*Reference) UnmarshalJSON ¶
type ReferenceInterface ¶
type References ¶
type References []ReferenceInterface
func NewReferences ¶
func NewReferences() References
type Release ¶
type Release struct { Common TagName string `json:"tag_name"` TargetCommitish string `json:"target_commitish"` Name string `json:"name"` Body string `json:"body"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` PublisherID *Reference `json:"publisher_id"` Assets []*ReleaseAsset `json:"assets"` Created time.Time `json:"created"` }
func (Release) GetCmpIgnoreFields ¶
func (*Release) GetReferences ¶
func (o *Release) GetReferences() References
type ReleaseAsset ¶
type ReleaseAsset struct { Common Name string `json:"name"` ContentType string `json:"content_type"` Size int64 `json:"size"` DownloadCount int64 `json:"download_count"` Created time.Time `json:"created"` SHA256 string `json:"sha256"` DownloadURL string `json:"download_url"` DownloadFunc DownloadFuncType `json:"-"` }
func (*ReleaseAsset) Clone ¶
func (o *ReleaseAsset) Clone() Interface
func (ReleaseAsset) GetCmpIgnoreFields ¶
func (o ReleaseAsset) GetCmpIgnoreFields() []string
func (ReleaseAsset) GetComparers ¶
func (o ReleaseAsset) GetComparers() []Comparer
type Repository ¶
type Repository struct { Common Name string FetchFunc func(ctx context.Context, destination string) `json:"-"` }
func (*Repository) Clone ¶
func (r *Repository) Clone() Interface
func (*Repository) GetCmpIgnoreFields ¶
func (r *Repository) GetCmpIgnoreFields() []string
type Review ¶
type Review struct { Common ReviewerID *Reference `json:"reviewer_id"` Official bool `json:"official"` CommitID string `json:"commit_id"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` State string `json:"state"` }
func (Review) GetCmpIgnoreFields ¶
func (*Review) GetReferences ¶
func (o *Review) GetReferences() References
type ReviewComment ¶
type ReviewComment struct { Common InReplyTo *Reference `json:"in_reply_to"` Content string `json:"content"` TreePath string `json:"tree_path"` DiffHunk string `json:"diff_hunk"` Position int `json:"position"` Line int `json:"line"` CommitID string `json:"commit_id"` PosterID *Reference `json:"poster_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*ReviewComment) Clone ¶
func (o *ReviewComment) Clone() Interface
func (ReviewComment) GetCmpIgnoreFields ¶
func (o ReviewComment) GetCmpIgnoreFields() []string
func (*ReviewComment) GetReferences ¶
func (o *ReviewComment) GetReferences() References
Source Files ¶
Click to show internal directories.
Click to hide internal directories.