Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "account", Aliases: []string{"user"}, Short: "Manage accounts", Run: func(cmd *cobra.Command, args []string) { fmt.Println("Issue 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 Account ¶ added in v0.5.0
type Account struct { Type string `json:"type" mapstructure:"type"` ID common.UUID `json:"uuid" mapstructure:"uuid"` Username string `json:"username" mapstructure:"username"` Name string `json:"display_name" mapstructure:"display_name"` AccountID string `json:"account_id" mapstructure:"account_id"` AccountStatus string `json:"account_status" mapstructure:"account_status"` Kind string `json:"kind" mapstructure:"kind"` Links common.Links `json:"links" mapstructure:"links"` CreatedOn time.Time `json:"created_on" mapstructure:"created_on"` }
func GetAccount ¶ added in v0.5.0
func GetAccount(context context.Context, cmd *cobra.Command, currentProfile *profile.Profile, userid string) (account *Account, err error)
GetAccount gets a user
func GetMe ¶ added in v0.5.0
func GetMe(context context.Context, cmd *cobra.Command, currentProfile *profile.Profile) (account *Account, err error)
GetMe gets the current user
func (Account) GetHeader ¶ added in v0.5.0
GetHeader gets the header for a table
implements common.Tableable
func (Account) MarshalJSON ¶ added in v0.5.0
MarshalJSON implements the json.Marshaler interface.
type Participant ¶
type Participant struct { Type string `json:"type" mapstructure:"type"` User User `json:"user" mapstructure:"user"` Role string `json:"role" mapstructure:"role"` Approved bool `json:"approved" mapstructure:"approved"` State string `json:"state" mapstructure:"state"` ParticipatedOn time.Time `json:"participated_on" mapstructure:"participated_on"` }
func (Participant) GetHeader ¶ added in v0.3.0
func (participant Participant) GetHeader(short bool) []string
GetHeader gets the header for a table
implements common.Tableable
func (Participant) GetRow ¶ added in v0.3.0
func (participant Participant) GetRow(headers []string) []string
GetRow gets the row for a table
implements common.Tableable
type User ¶
type User struct { Type string `json:"type" mapstructure:"type"` ID common.UUID `json:"uuid" mapstructure:"uuid"` AccountID string `json:"account_id" mapstructure:"account_id"` Name string `json:"display_name" mapstructure:"display_name"` Nickname string `json:"nickname" mapstructure:"nickname"` Raw string `json:"raw,omitempty" mapstructure:"raw"` Links common.Links `json:"links" mapstructure:"links"` }
Click to show internal directories.
Click to hide internal directories.