project

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Command represents this folder's command

Functions

func GetProjectKeys

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 GetProjectNames added in v0.7.0

func GetProjectNames(context context.Context, cmd *cobra.Command, args []string) (names []string)

GetProjectNames gets the names of the projects in the workspace given in the command

Types

type Project

type Project struct {
	Type                           string              `json:"type"                       mapstructure:"type"`
	ID                             common.UUID         `json:"uuid"                       mapstructure:"uuid"`
	Name                           string              `json:"name"                       mapstructure:"name"`
	Description                    string              `json:"description,omitempty"      mapstructure:"description"`
	Key                            string              `json:"key"                        mapstructure:"key"`
	Owner                          user.User           `json:"owner"                      mapstructure:"owner"`
	Workspace                      workspace.Workspace `json:"workspace"                  mapstructure:"workspace"`
	Links                          common.Links        `json:"links"                      mapstructure:"links"`
	IsPrivate                      bool                `json:"is_private"                 mapstructure:"is_private"`
	HasPubliclyVisibleRepositories bool                `json:"has_publicly_visible_repos" mapstructure:"has_publicly_visible_repos"`
	CreatedOn                      time.Time           `json:"created_on"                 mapstructure:"created_on"`
	UpdatedOn                      time.Time           `json:"updated_on"                 mapstructure:"updated_on"`
}

func (Project) GetHeader added in v0.4.0

func (project Project) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Project) GetRow added in v0.4.0

func (project Project) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (Project) MarshalJSON

func (project Project) MarshalJSON() (data []byte, err error)

MarshalJSON implements the json.Marshaler interface.

func (Project) String

func (project Project) String() string

String gets a string representation of this pullrequest

implements fmt.Stringer

func (*Project) Validate

func (project *Project) Validate() error

Validate validates a Project

type ProjectCreator

type ProjectCreator struct {
	Name        string        `json:"name"`
	Description string        `json:"description,omitempty"`
	Key         string        `json:"key"`
	Links       *common.Links `json:"links,omitempty"`
	IsPrivate   bool          `json:"is_private"`
}

type ProjectReference added in v0.7.0

type ProjectReference struct {
	Key string `json:"key" mapstructure:"key"`
}

func NewReference added in v0.7.0

func NewReference(key string) *ProjectReference

NewReference creates a new ProjectReference

type ProjectUpdator

type ProjectUpdator struct {
	Name        string        `json:"name,omitempty"`
	Description string        `json:"description,omitempty"`
	Key         string        `json:"key,omitempty"`
	Links       *common.Links `json:"links,omitempty"`
	IsPrivate   bool          `json:"is_private"`
}

type Projects added in v0.4.0

type Projects []Project

func (Projects) GetHeader added in v0.4.0

func (projects Projects) GetHeader() []string

GetHeader gets the headers for the list command

implements common.Tableables

func (Projects) GetRowAt added in v0.4.0

func (projects Projects) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for the list command

implements common.Tableables

func (Projects) Size added in v0.4.0

func (projects Projects) Size() int

Size gets the number of elements

implements common.Tableables

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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