Documentation ¶
Index ¶
- Constants
- func IsNil(i interface{}) bool
- type Anonymous
- type GitCredential
- type Query
- type Reference
- type Resource
- type Service
- func (s *Service) Add(resource *Resource) (*Resource, error)
- func (s *Service) Get(query Query) (*resources.Resources[*Resource], error)
- func (s *Service) GetByID(id string) (*Resource, error)
- 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)
- type Type
- type UsernamePassword
Constants ¶
const ( GitCredentialTypeAnonymous = Type("Anonymous") GitCredentialTypeReference = Type("Reference") GitCredentialTypeUsernamePassword = Type("UsernamePassword") )
Variables ¶
This section is empty.
Functions ¶
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 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 ¶
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.
func (*Service) GetByID ¶
GetByID returns the Git credential that matches the input ID. If one cannot be found, it returns nil and an error.
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.