Documentation ¶
Index ¶
- Variables
- func DeleteIntegration(so SnykOptions, orgId string, intType string) error
- func DeleteOrganization(so SnykOptions, id string) error
- func IntegrationExists(so SnykOptions, org string, intType string) (bool, error)
- func OrganizationExistsByName(so SnykOptions, name string) (bool, error)
- 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 SnykOptions
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 ¶ added in v0.2.0
func DeleteIntegration(so SnykOptions, orgId string, intType string) error
func DeleteOrganization ¶
func DeleteOrganization(so SnykOptions, id string) error
func IntegrationExists ¶ added in v0.2.0
func IntegrationExists(so SnykOptions, org string, intType string) (bool, error)
func OrganizationExistsByName ¶ added in v0.2.0
func OrganizationExistsByName(so SnykOptions, name string) (bool, error)
Types ¶
type Integration ¶ added in v0.2.0
type Integration struct { Id string `json:"id,omitempty"` OrgId string `json:"-"` Type string `json:"type"` Credentials IntegrationCredentials `json:"credentials"` }
func CreateIntegration ¶ added in v0.2.0
func CreateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
func GetIntegration ¶ added in v0.2.0
func GetIntegration(so SnykOptions, orgId string, intType string) (*Integration, error)
func UpdateIntegration ¶ added in v0.2.0
func UpdateIntegration(so SnykOptions, orgId string, intType string, creds IntegrationCredentials) (*Integration, error)
type IntegrationCredentials ¶ added in v0.2.0
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 SnykOptions ¶
Click to show internal directories.
Click to hide internal directories.