Documentation ¶
Index ¶
- Constants
- func DeleteByID(client newclient.Client, spaceID string, ID string) error
- func Get(client newclient.Client, spaceID string, query Query) (*resources.Resources[*Resource], error)
- func IsNil(i interface{}) bool
- type Anonymous
- type GitCredential
- type Query
- type Reference
- type Resource
- func Add(client newclient.Client, resource *Resource) (*Resource, error)
- func GetByID(client newclient.Client, spaceID string, ID string) (*Resource, error)
- func NewResource(name string, credential GitCredential) *Resource
- func Update(client newclient.Client, gitCredential *Resource) (*Resource, error)
- type Service
- func (s *Service) Add(resource *Resource) (*Resource, error)deprecated
- func (s *Service) Get(query Query) (*resources.Resources[*Resource], error)deprecated
- func (s *Service) GetByID(id string) (*Resource, error)deprecated
- func (s *Service) GetByIDOrName(idOrName string) (*Resource, error)
- func (s *Service) GetByName(name string) (*Resource, error)
- func (s *Service) GetByPartialName(partialName string) ([]*Resource, error)
- func (s *Service) Update(gitCredential *Resource) (*Resource, error)deprecated
- type Type
- type UsernamePassword
Constants ¶
const ( GitCredentialTypeAnonymous = Type("Anonymous") GitCredentialTypeReference = Type("Reference") GitCredentialTypeUsernamePassword = Type("UsernamePassword") )
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID deletes a Git credential based on the provided ID.
func Get ¶ added in v2.33.0
func Get(client newclient.Client, spaceID string, query Query) (*resources.Resources[*Resource], error)
Get returns a collection of environments 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 Anonymous ¶
type Anonymous struct {
// contains filtered or unexported fields
}
func NewAnonymous ¶
func NewAnonymous() *Anonymous
type GitCredential ¶ added in v2.12.0
type GitCredential interface {
Type() Type
}
GitCredential defines the interface for Git credentials.
type Reference ¶
type Reference struct { ID string `json:"Id"` // contains filtered or unexported fields }
Reference defines a reference Git credential.
func NewReference ¶
NewReference creates and initializes a reference Git credential.
type Resource ¶
type Resource struct { Description string `json:"Description,omitempty"` Details GitCredential `json:"Details"` Name string `json:"Name"` SpaceID string `json:"SpaceId,omitempty"` resources.Resource }
func GetByID ¶ added in v2.33.0
GetByID returns the Git credential that matches the input ID. If one cannot be found, it returns nil and an error.
func NewResource ¶
func NewResource(name string, credential GitCredential) *Resource
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON sets the resource to its representation in JSON.
type Service ¶
type Service struct {
services.CanDeleteService
}
func NewService ¶
NewService returns a service with a preconfigured client.
func (*Service) Get
deprecated
func (*Service) GetByPartialName ¶
type UsernamePassword ¶
type UsernamePassword struct { Password *core.SensitiveValue `json:"Password"` Username string `json:"Username"` // contains filtered or unexported fields }
UsernamePassword defines a username-password Git credential.
func NewUsernamePassword ¶
func NewUsernamePassword(username string, password *core.SensitiveValue) *UsernamePassword
NewUsernamePassword creates and initializes an username-password Git credential.
func (*UsernamePassword) Type ¶ added in v2.12.0
func (u *UsernamePassword) Type() Type
Type returns the type for this Git credential.