Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Command = &cobra.Command{ Use: "attachment", Short: "Manage attachments", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Attachment requires a subcommand:") for _, command := range cmd.Commands() { fmt.Println(command.Name()) } }, }
Command represents this folder's command.
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct { Type string `json:"type" mapstructure:"type"` Name string `json:"name" mapstructure:"name"` Link AttachmentLink `json:"links" mapstructure:"links"` }
func (Attachment) GetHeader ¶
func (attachment Attachment) GetHeader(short bool) []string
GetHeader gets the header for a table
implements common.Tableable
func (Attachment) GetRow ¶
func (attachment Attachment) GetRow(headers []string) []string
GetRow gets the row for a table
implements common.Tableable
func (Attachment) String ¶
func (attachment Attachment) String() string
String gets a string representation of this pullrequest
implements fmt.Stringer
func (*Attachment) Validate ¶
func (attachment *Attachment) Validate() error
Validate validates a Comment
type AttachmentLink ¶
func (AttachmentLink) MarshalJSON ¶
func (link AttachmentLink) MarshalJSON() (data []byte, err error)
MarshalJSON marshals the URL into JSON
implements the json.Marshaler interface
func (AttachmentLink) String ¶
func (link AttachmentLink) String() string
String returns the string representation of the URL
implements the Stringer interface
func (*AttachmentLink) UnmarshalJSON ¶
func (link *AttachmentLink) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the URL from JSON
implements the json.Unmarshaler interface
type Attachments ¶
type Attachments []Attachment
func (Attachments) GetHeader ¶
func (comments Attachments) GetHeader() []string
GetHeader gets the headers for the list command
implements common.Tableables
func (Attachments) GetRowAt ¶
func (comments Attachments) GetRowAt(index int, headers []string) []string
GetRowAt gets the row for the list command
implements common.Tableables
func (Attachments) Size ¶
func (comments Attachments) Size() int
Size gets the number of elements
implements common.Tableables