Documentation
¶
Overview ¶
Package projects provides a client for managing Redmine projects.
Package projects provides commands for managing Redmine projects.
Package projects provides types for managing Redmine projects.
Index ¶
- func NewCommand(flags *types.GlobalFlags, resolver types.Resolver) *cobra.Command
- type Client
- func (c *Client) Create(ctx context.Context, req *ProjectCreateRequest) (*Project, error)
- func (c *Client) Delete(ctx context.Context, id int) error
- func (c *Client) Get(ctx context.Context, id int, params map[string]string) (*Project, error)
- func (c *Client) GetByIdentifier(ctx context.Context, identifier string, params map[string]string) (*Project, error)
- func (c *Client) List(ctx context.Context, params map[string]string) (*ProjectList, error)
- func (c *Client) Update(ctx context.Context, id int, req *ProjectUpdateRequest) error
- type Project
- type ProjectCreateRequest
- type ProjectList
- type ProjectUpdateRequest
- type Reference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new projects command.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for managing Redmine projects.
func (*Client) GetByIdentifier ¶
func (c *Client) GetByIdentifier(ctx context.Context, identifier string, params map[string]string) (*Project, error)
GetByIdentifier retrieves a project by identifier.
type Project ¶
type Project struct {
ID int `json:"id"`
Name string `json:"name"`
Identifier string `json:"identifier"`
Description string `json:"description"`
Homepage string `json:"homepage"`
Status int `json:"status"`
Parent *Reference `json:"parent,omitempty"`
CreatedOn *time.Time `json:"created_on,omitempty"`
UpdatedOn *time.Time `json:"updated_on,omitempty"`
Trackers []Reference `json:"trackers,omitempty"`
IssueCategories []Reference `json:"issue_categories,omitempty"`
EnabledModules []Reference `json:"enabled_modules,omitempty"`
}
Project represents a Redmine project.
type ProjectCreateRequest ¶
type ProjectCreateRequest struct {
Name string `json:"name,omitempty"`
Identifier string `json:"identifier,omitempty"`
Description string `json:"description,omitempty"`
Homepage string `json:"homepage,omitempty"`
IsPublic bool `json:"is_public,omitempty"`
ParentID int `json:"parent_id,omitempty"`
InheritMembers bool `json:"inherit_members,omitempty"`
}
ProjectCreateRequest represents a request to create a project.
type ProjectList ¶
type ProjectList struct {
Projects []Project `json:"projects"`
TotalCount int `json:"total_count"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
ProjectList represents a list of projects with pagination info.
Click to show internal directories.
Click to hide internal directories.