reviewer

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "reviewer",
	Short: "Manage reviewers",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Reviewer requires a subcommand:")
		for _, command := range cmd.Commands() {
			fmt.Println(command.Name())
		}
	},
}

Command represents this folder's command

Functions

func GetProjectKeys added in v0.5.0

func GetProjectKeys(context context.Context, cmd *cobra.Command, args []string) (keys []string)

GetProjectKeys gets the keys of the projects in the workspace given in the command

func GetReviewerUserIDs added in v0.5.0

func GetReviewerUserIDs(context context.Context, cmd *cobra.Command, currentProfile *profile.Profile, workspace, project string) (ids []string)

GetReviewerIDs gets the IDs of the reviewers in the given workspace and project

Types

type Reviewer

type Reviewer struct {
	Type         string    `json:"type" mapstructure:"type"`
	ReviewerType string    `json:"reviewer_type" mapstructure:"reviewer_type"`
	User         user.User `json:"user" mapstructure:"user"`
}

func (Reviewer) GetHeader

func (reviewer Reviewer) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Reviewer) GetRow

func (reviewer Reviewer) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (*Reviewer) Validate

func (reviewer *Reviewer) Validate() error

Validate validates a Reviewer

type Reviewers

type Reviewers []Reviewer

func (Reviewers) GetHeader

func (reviewers Reviewers) GetHeader() []string

GetHeader gets the headers for the list command

implements common.Tableables

func (Reviewers) GetRowAt

func (reviewers Reviewers) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for the list command

implements common.Tableables

func (Reviewers) Size

func (reviewers Reviewers) Size() int

Size gets the number of elements

implements common.Tableables

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL