Documentation ¶
Index ¶
- func DeleteByID(client newclient.Client, spaceID string, id string) error
- func Get(client newclient.Client, spaceID string, projectGroupsQuery ProjectGroupsQuery) (*resources.Resources[*ProjectGroup], error)
- func IsNil(i interface{}) bool
- type ProjectGroup
- func Add(client newclient.Client, projectGroup *ProjectGroup) (*ProjectGroup, error)
- func GetAll(client newclient.Client, spaceID string) ([]*ProjectGroup, error)
- func GetByID(client newclient.Client, spaceID string, id string) (*ProjectGroup, error)
- func NewProjectGroup(name string) *ProjectGroup
- func Update(client newclient.Client, resource ProjectGroup) (*ProjectGroup, error)
- type ProjectGroupService
- func (s *ProjectGroupService) Add(projectGroup *ProjectGroup) (*ProjectGroup, error)deprecated
- func (s *ProjectGroupService) Get(projectGroupsQuery ProjectGroupsQuery) (*resources.Resources[*ProjectGroup], error)deprecated
- func (s *ProjectGroupService) GetAll() ([]*ProjectGroup, error)
- func (s *ProjectGroupService) GetByID(id string) (*ProjectGroup, error)deprecated
- func (s *ProjectGroupService) GetByIDOrName(idOrName string) (*ProjectGroup, error)
- func (s *ProjectGroupService) GetByName(name string) (*ProjectGroup, error)
- func (s *ProjectGroupService) GetByPartialName(partialName string) ([]*ProjectGroup, error)
- func (s *ProjectGroupService) GetProjects(projectGroup *ProjectGroup) ([]*projects.Project, error)
- func (s *ProjectGroupService) Update(resource ProjectGroup) (*ProjectGroup, error)deprecated
- type ProjectGroupsQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID deletes the resource that matches the space ID and input ID.
func Get ¶ added in v2.33.0
func Get(client newclient.Client, spaceID string, projectGroupsQuery ProjectGroupsQuery) (*resources.Resources[*ProjectGroup], error)
Get returns a collection of project groups based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Types ¶
type ProjectGroup ¶
type ProjectGroup struct { Description string `json:"Description,omitempty"` EnvironmentIDs []string `json:"EnvironmentIds,omitempty"` Name string `json:"Name,omitempty" validate:"required"` RetentionPolicyID string `json:"RetentionPolicyId,omitempty"` SpaceID string `json:"SpaceId,omitempty"` resources.Resource }
func Add ¶ added in v2.33.0
func Add(client newclient.Client, projectGroup *ProjectGroup) (*ProjectGroup, error)
Add creates a new project group.
func GetAll ¶ added in v2.34.0
func GetAll(client newclient.Client, spaceID string) ([]*ProjectGroup, error)
GetAll returns all project groups. If an error occurs, it returns nil.
func GetByID ¶ added in v2.33.0
GetByID returns the project group that matches the input ID. If one cannot be found, it returns nil and an error.
func NewProjectGroup ¶
func NewProjectGroup(name string) *ProjectGroup
func Update ¶ added in v2.33.0
func Update(client newclient.Client, resource ProjectGroup) (*ProjectGroup, error)
Update modifies a project group based on the one provided as input.
func (*ProjectGroup) GetName ¶ added in v2.11.1
func (s *ProjectGroup) GetName() string
type ProjectGroupService ¶
type ProjectGroupService struct {
services.CanDeleteService
}
ProjectGroupService handles communication with ProjectGroup-related methods of the Octopus API.
func NewProjectGroupService ¶
func NewProjectGroupService(sling *sling.Sling, uriTemplate string) *ProjectGroupService
NewProjectGroupService returns a projectGroupService with a preconfigured client.
func (*ProjectGroupService) Add
deprecated
func (s *ProjectGroupService) Add(projectGroup *ProjectGroup) (*ProjectGroup, error)
Add creates a new project group.
Deprecated: Use projectgroups.Add
func (*ProjectGroupService) Get
deprecated
func (s *ProjectGroupService) Get(projectGroupsQuery ProjectGroupsQuery) (*resources.Resources[*ProjectGroup], error)
Get returns a collection of project groups based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Deprecated: Use projectgroups.Get
func (*ProjectGroupService) GetAll ¶
func (s *ProjectGroupService) GetAll() ([]*ProjectGroup, error)
GetAll returns all project groups. If none can be found or an error occurs, it returns an empty collection.
Deprecates: use projectgroups.GetAll
func (*ProjectGroupService) GetByID
deprecated
func (s *ProjectGroupService) GetByID(id string) (*ProjectGroup, error)
GetByID returns the project group that matches the input ID. If one cannot be found, it returns nil and an error.
Deprecated: Use projectgroups.GetByID
func (*ProjectGroupService) GetByIDOrName ¶ added in v2.8.0
func (s *ProjectGroupService) GetByIDOrName(idOrName string) (*ProjectGroup, error)
func (*ProjectGroupService) GetByName ¶ added in v2.8.0
func (s *ProjectGroupService) GetByName(name string) (*ProjectGroup, error)
func (*ProjectGroupService) GetByPartialName ¶
func (s *ProjectGroupService) GetByPartialName(partialName string) ([]*ProjectGroup, error)
GetByPartialName performs a lookup and returns a collection of project groups with a matching partial name.
func (*ProjectGroupService) GetProjects ¶
func (s *ProjectGroupService) GetProjects(projectGroup *ProjectGroup) ([]*projects.Project, error)
func (*ProjectGroupService) Update
deprecated
func (s *ProjectGroupService) Update(resource ProjectGroup) (*ProjectGroup, error)
Update modifies a project group based on the one provided as input.
Deprecated: Use projectgroups.Update