Documentation ¶
Index ¶
- Constants
- type ApiMessageResponse
- type BoolString
- type DateTime
- type KeyListResponse
- type Repository
- type RepositoryACL
- type RepositoryACLResponse
- type RepositoryInfosResponse
- type RepositoryListEntry
- type RepositoryListResponse
- type RepositoryService
- func (s *RepositoryService) Create(repo *Repository) (*ApiMessageResponse, error)
- func (s *RepositoryService) Delete(name string) (*ApiMessageResponse, error)
- func (s *RepositoryService) GetACL(name string) (*RepositoryACLResponse, error)
- func (s *RepositoryService) Infos(name string) (*RepositoryInfosResponse, error)
- func (s *RepositoryService) List() (*RepositoryListResponse, error)
- func (s *RepositoryService) SetACL(name string, acl *RepositoryACL) (*ApiMessageResponse, error)
- type SSHKey
- type SSHKeyService
- type Service
- type SignedData
- type UtilsService
Constants ¶
View Source
const ( DefaultApiBaseURL = "https://blih.epitech.eu/" DefaultUserAgent = "go-blih" )
View Source
const (
DefaultRepositoryType = "git"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiMessageResponse ¶
type ApiMessageResponse struct {
Message string `json:"message"`
}
type BoolString ¶
type BoolString bool
func (BoolString) UnmarshalJSON ¶
func (bs BoolString) UnmarshalJSON(b []byte) error
type DateTime ¶
func (*DateTime) UnmarshalJSON ¶
type KeyListResponse ¶
type Repository ¶
type Repository struct { // The repository name Name string `json:"name"` // The repository type (usually "git") Type string `json:"type"` // An optional description Description string `json:"description,omitempty"` }
A structure which represents a Blih repository.
type RepositoryACL ¶
func (*RepositoryACL) Validate ¶
func (a *RepositoryACL) Validate() bool
type RepositoryACLResponse ¶
type RepositoryInfosResponse ¶
type RepositoryInfosResponse struct { Message struct { URL string `json:"url"` UUID string `json:"uuid"` Public BoolString `json:"public,string"` Description string `json:"description"` CreationTime DateTime `json:"creation_time,string"` } }
type RepositoryListEntry ¶
type RepositoryListResponse ¶
type RepositoryListResponse struct { Message string `json:"message"` Repositories map[string]RepositoryListEntry `json:"repositories"` }
type RepositoryService ¶
type RepositoryService struct {
// contains filtered or unexported fields
}
func NewRepositoryService ¶
func NewRepositoryService(s *Service) *RepositoryService
func (*RepositoryService) Create ¶
func (s *RepositoryService) Create(repo *Repository) (*ApiMessageResponse, error)
func (*RepositoryService) Delete ¶
func (s *RepositoryService) Delete(name string) (*ApiMessageResponse, error)
func (*RepositoryService) GetACL ¶
func (s *RepositoryService) GetACL(name string) (*RepositoryACLResponse, error)
func (*RepositoryService) Infos ¶
func (s *RepositoryService) Infos(name string) (*RepositoryInfosResponse, error)
func (*RepositoryService) List ¶
func (s *RepositoryService) List() (*RepositoryListResponse, error)
func (*RepositoryService) SetACL ¶
func (s *RepositoryService) SetACL(name string, acl *RepositoryACL) (*ApiMessageResponse, error)
type SSHKeyService ¶
type SSHKeyService struct {
// contains filtered or unexported fields
}
func NewSSHKeyService ¶
func NewSSHKeyService(s *Service) *SSHKeyService
func (*SSHKeyService) Create ¶
func (s *SSHKeyService) Create(key *SSHKey) (*ApiMessageResponse, error)
func (*SSHKeyService) Delete ¶
func (s *SSHKeyService) Delete(name string) (*ApiMessageResponse, error)
func (*SSHKeyService) List ¶
func (s *SSHKeyService) List() (*KeyListResponse, error)
type Service ¶
type Service struct { User string BaseURL string UserAgent string Utils *UtilsService Repository *RepositoryService SSHKey *SSHKeyService // contains filtered or unexported fields }
func (*Service) NewRequest ¶
func (*Service) SendRequest ¶
type SignedData ¶
type UtilsService ¶
type UtilsService struct {
// contains filtered or unexported fields
}
func NewUtilsService ¶
func NewUtilsService(s *Service) *UtilsService
func (*UtilsService) WhoAmI ¶
func (s *UtilsService) WhoAmI() (*ApiMessageResponse, error)
Click to show internal directories.
Click to hide internal directories.