Documentation
¶
Index ¶
- Variables
- type Activities
- type Activity
- func (activity Activity) GetHeader(short bool) []string
- func (activity Activity) GetRow(headers []string) []string
- func (activity Activity) MarshalJSON() (data []byte, err error)
- func (activity Activity) String() string
- func (activity *Activity) UnmarshalJSON(data []byte) (err error)
- func (activity *Activity) Validate() error
- type Approval
- type Branch
- type Endpoint
- type PullRequestReference
- type Update
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "activity", Short: "Manage activities", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Activity requires a subcommand:") for _, command := range cmd.Commands() { fmt.Println(command.Name()) } }, }
Command represents this folder's command
Functions ¶
This section is empty.
Types ¶
type Activities ¶
type Activities []Activity
func (Activities) GetHeader ¶
func (activities Activities) GetHeader() []string
GetHeader gets the headers for the list command
implements common.Tableables
func (Activities) GetRowAt ¶
func (activities Activities) GetRowAt(index int, headers []string) []string
GetRowAt gets the row for the list command
implements common.Tableables
func (Activities) Size ¶
func (activities Activities) Size() int
Size gets the number of elements
implements common.Tableables
type Activity ¶
type Activity struct { PullRequest PullRequestReference `json:"pull_request" mapstructure:"pullrequest"` Approval *Approval `json:"approval,omitempty" mapstructure:"approval"` Comment *comment.Comment `json:"comment,omitempty" mapstructure:"comment"` Update *Update `json:"update,omitempty" mapstructure:"update"` }
func (Activity) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
implements json.Marshaler
func (Activity) String ¶
String gets a string representation of this pullrequest
implements fmt.Stringer
func (*Activity) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
implements json.Unmarshaler
type Approval ¶
type Approval struct { Date time.Time `json:"date" mapstructure:"date"` User user.User `json:"user" mapstructure:"user"` PullRequest *PullRequestReference `json:"pullrequest" mapstructure:"pullrequest"` }
type Endpoint ¶
type Endpoint struct { Branch Branch `json:"branch" mapstructure:"branch"` Commit *commit.Commit `json:"commit,omitempty" mapstructure:"commit"` Repository *repository.Repository `json:"repository,omitempty" mapstructure:"repository"` }
type PullRequestReference ¶
type Update ¶
type Update struct { Date time.Time `json:"date" mapstructure:"date"` Type string `json:"type" mapstructure:"type"` ID uint64 `json:"id" mapstructure:"id"` Title string `json:"title" mapstructure:"title"` Description string `json:"description" mapstructure:"description"` Summary common.RenderedText `json:"summary" mapstructure:"summary"` State string `json:"state" mapstructure:"state"` MergeCommit *commit.Commit `json:"merge_commit,omitempty" mapstructure:"merge_commit"` CloseSourceBranch bool `json:"close_source_branch" mapstructure:"close_source_branch"` ClosedBy user.User `json:"closed_by" mapstructure:"closed_by"` Author user.User `json:"author" mapstructure:"author"` Reason string `json:"reason" mapstructure:"reason"` Destination Endpoint `json:"destination" mapstructure:"destination"` Source Endpoint `json:"source" mapstructure:"source"` Links common.Links `json:"links" mapstructure:"links"` CommentCount uint64 `json:"comment_count" mapstructure:"comment_count"` TaskCount uint64 `json:"task_count" mapstructure:"task_count"` CreatedOn time.Time `json:"created_on" mapstructure:"created_on"` UpdatedOn time.Time `json:"updated_on" mapstructure:"updated_on"` }
Click to show internal directories.
Click to hide internal directories.