Documentation
¶
Index ¶
- Variables
- func DeleteIntegration(so SnykOptions, orgId string, intType string) error
- func DeleteOrganization(so SnykOptions, id string) error
- func DeleteProject(so SnykOptions, orgId string, intType string) error
- func IntegrationExists(so SnykOptions, org string, intType string) (bool, error)
- func OrganizationExistsByName(so SnykOptions, name string) (bool, error)
- type AttributesRest
- type ImportStatus
- type Integration
- func CreateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
- func GetIntegration(so SnykOptions, orgId string, intType string) (*Integration, error)
- func UpdateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
- type IntegrationCredentials
- type Organization
- type OwnerDetails
- type Projects
- type ProjectsRest
- type SnykOptions
- type Target
- type TargetImport
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAuthn = errors.New("credentials not valid")
View Source
var ErrInvalidAuthz = errors.New("credentials not authorized to access resource")
View Source
var ErrNotFound = errors.New("requested resource not found")
View Source
var ErrUnexpectedStatus = errors.New("unexpected HTTP status code")
Functions ¶
func DeleteIntegration ¶
func DeleteIntegration(so SnykOptions, orgId string, intType string) error
func DeleteOrganization ¶
func DeleteOrganization(so SnykOptions, id string) error
func DeleteProject ¶
func DeleteProject(so SnykOptions, orgId string, intType string) error
func IntegrationExists ¶
func IntegrationExists(so SnykOptions, org string, intType string) (bool, error)
func OrganizationExistsByName ¶
func OrganizationExistsByName(so SnykOptions, name string) (bool, error)
Types ¶
type AttributesRest ¶ added in v0.4.3
type ImportStatus ¶
type Integration ¶
type Integration struct {
Id string `json:"id,omitempty"`
OrgId string `json:"-"`
Type string `json:"type"`
Credentials IntegrationCredentials `json:"credentials"`
}
func CreateIntegration ¶
func CreateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
func GetIntegration ¶
func GetIntegration(so SnykOptions, orgId string, intType string) (*Integration, error)
func UpdateIntegration ¶
func UpdateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
type IntegrationCredentials ¶
type IntegrationCredentials struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
RegistryBase string `json:"registryBase,omitempty"`
Url string `json:"url,omitempty"`
Token string `json:"token,omitempty"`
Region string `json:"region,omitempty"`
RoleArn string `json:"roleArn,omitempty"`
}
type Organization ¶
type Organization struct {
Id string `json:"id,omitempty"`
Name string `json:"name"`
Slug string `json:"slug"`
Url string `json:"url"`
Created time.Time `json:"created,omitempty"`
}
func CreateOrganization ¶
func CreateOrganization(so SnykOptions, name string) (*Organization, error)
func GetOrganization ¶
func GetOrganization(so SnykOptions, id string) (*Organization, error)
type OwnerDetails ¶
func GetProjectOwner ¶
func GetProjectOwner(so SnykOptions, orgId string, intType string) (*OwnerDetails, error)
type Projects ¶
type Projects struct {
Id string `json:"id"`
Name string `json:"name"`
Origin string `json:"origin"`
Branch string `json:"branch"`
Owner OwnerDetails
}
func GetProjectById ¶
func GetProjectById(so SnykOptions, orgId string, intType string) (*Projects, error)
type ProjectsRest ¶ added in v0.4.3
type ProjectsRest struct {
Id string `json:"id"`
Attributes AttributesRest
}
func GetAllProjects ¶
func GetAllProjects(so SnykOptions, orgId string) ([]ProjectsRest, error)
func GetProjectByName ¶
func GetProjectByName(so SnykOptions, orgId string, name string) (*ProjectsRest, error)
type SnykOptions ¶
type Target ¶
type Target struct {
Owner string `json:"owner"`
Name string `json:"name"`
Branch string `json:"branch"`
Id string `json:"id,omitempty"`
}
func ImportProject ¶
type TargetImport ¶
type TargetImport struct {
Target Target `json:"target"`
}
Click to show internal directories.
Click to hide internal directories.