Documentation
¶
Index ¶
- Variables
- type AndroidLibrariesList
- type AndroidMetadata
- type Client
- type IOSMetadata
- type IosLibrariesList
- type LatestAnalysis
- type LatestAnalysisList
- type LegacyService
- type MetaDataService
- type Monitor
- type MonitorAnalysis
- type MonitorList
- type MonitorRequest
- type MonitorsService
- func (s *MonitorsService) Add(ctx context.Context, mr MonitorRequest) (*Monitor, *http.Response, error)
- func (s *MonitorsService) Analysis(ctx context.Context, since time.Time) (*[]MonitorAnalysis, *http.Response, error)
- func (s *MonitorsService) Delete(ctx context.Context, mr MonitorRequest) (*http.Response, error)
- func (s *MonitorsService) Get(ctx context.Context, mr MonitorRequest) (*Monitor, *http.Response, error)
- func (s *MonitorsService) List(ctx context.Context) (*MonitorList, *http.Response, error)
- type Publisher
- type Report
- type ReportsService
- type SearchesService
- func (s *SearchesService) AndroidLibraries(ctx context.Context, classPrefix string, version string) (*AndroidLibrariesList, *http.Response, error)
- func (s *SearchesService) AndroidMetadata(ctx context.Context, search string) (*AndroidMetadata, *http.Response, error)
- func (s *SearchesService) IOSLibraries(ctx context.Context, name string, version string) (*IosLibrariesList, *http.Response, error)
- func (s *SearchesService) IOSMetadata(ctx context.Context, search string) (*IOSMetadata, *http.Response, error)
- type UserToken
- type UserTokenRequest
- type UsersService
Constants ¶
This section is empty.
Variables ¶
var ErrMonitorNotFound = errors.New("Monitor not found")
ErrMonitorNotFound represents a 404
var (
ErrNotFound = errors.New("not found")
)
Errors.
Functions ¶
This section is empty.
Types ¶
type AndroidLibrariesList ¶
type AndroidLibrariesList []struct { Prefix string `json:"prefix"` Groupid string `json:"groupid"` Artifactid string `json:"artifactid"` Version string `json:"version"` LatestKnownVersion string `json:"latest_known_version"` Metadata struct { A string `json:"a"` G string `json:"g"` P string `json:"p"` V string `json:"v"` Ec []string `json:"ec"` ID string `json:"id"` Tags []string `json:"tags"` Timestamp int64 `json:"timestamp"` } `json:"metadata"` PomJSON struct { Project struct { XML struct { Xmlns string `json:"xmlns"` XmlnsXsi string `json:"xmlns:xsi"` XsiSchemaLocation string `json:"xsi:schemaLocation"` } `json:"$"` Scm []struct { URL []string `json:"url"` Connection []string `json:"connection"` DeveloperConnection []string `json:"developerConnection"` } `json:"scm"` URL []string `json:"url"` Name []string `json:"name"` GroupID []string `json:"groupId"` Version []string `json:"version"` Licenses []struct { License []struct { URL []string `json:"url"` Name []string `json:"name"` Distribution []string `json:"distribution"` } `json:"license"` } `json:"licenses"` Packaging []string `json:"packaging"` ArtifactID []string `json:"artifactId"` Developers []struct { Developer []struct { ID []string `json:"id"` Name []string `json:"name"` } `json:"developer"` } `json:"developers"` Description []string `json:"description"` Dependencies []struct { Dependency []struct { Scope []string `json:"scope"` GroupID []string `json:"groupId"` Version []string `json:"version"` ArtifactID []string `json:"artifactId"` } `json:"dependency"` } `json:"dependencies"` ModelVersion []string `json:"modelVersion"` } `json:"project"` } `json:"pom_json"` }
AndroidLibrariesList represents a list of librariers
type AndroidMetadata ¶
type AndroidMetadata []struct { ID string `json:"id"` TotalVersions int `json:"total_versions"` UpdatedAt time.Time `json:"updated_at"` Vendor string `json:"vendor"` VersionCode string `json:"version_code"` PackageName string `json:"package_name"` Name string `json:"name"` VersionString string `json:"version_string"` ApplicationKey string `json:"application_key"` LatestPublishedVersion string `json:"latest_published_version"` IsFree bool `json:"is_free"` LatestStatusDate time.Time `json:"latest_status_date"` IconURL string `json:"icon_url"` LatestAnalysisCreatedAt time.Time `json:"latest_analysis_created_at"` }
AndroidMetadata represents metadata for Android
type Client ¶
type Client struct { // Base URL for API requests. // always be specified with a trailing slash. BaseURL *url.URL // Services used for talking to different parts of the nowsecure API. MetaData *MetaDataService Searches *SearchesService Reports *ReportsService Monitors *MonitorsService Users *UsersService Legacy *LegacyService // contains filtered or unexported fields }
A Client manages communication with the Nowsecure API.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type IOSMetadata ¶
type IOSMetadata []struct { ID string `json:"id"` TotalVersions int `json:"total_versions"` ItunesVersion string `json:"itunes_version"` Title string `json:"title"` ApplicationID string `json:"application_id"` ApplicationKey string `json:"application_key"` PackageName string `json:"package_name"` LatestPublishedVersion string `json:"latest_published_version"` IsFree bool `json:"is_free"` LatestStatusDate time.Time `json:"latest_status_date"` IconURL string `json:"icon_url"` LatestAnalysisCreatedAt time.Time `json:"latest_analysis_created_at"` }
IOSMetadata represents metadata for IOS
type IosLibrariesList ¶
type IosLibrariesList []struct { Name string `json:"name"` Version string `json:"version"` IsLatest bool `json:"is_latest"` LatestKnownVersion string `json:"latest_known_version"` Spec struct { Name string `json:"name"` Source struct { Git string `json:"git"` Tag string `json:"tag"` Submodules bool `json:"submodules"` } `json:"source"` Authors struct { MatttThompson string `json:"Mattt Thompson"` } `json:"authors"` License string `json:"license"` Summary string `json:"summary"` Version string `json:"version"` Homepage string `json:"homepage"` Subspecs []struct { Ios struct { Frameworks []string `json:"frameworks"` } `json:"ios,omitempty"` Osx struct { Frameworks string `json:"frameworks"` } `json:"osx,omitempty"` Name string `json:"name"` Watchos struct { Frameworks []string `json:"frameworks"` } `json:"watchos,omitempty"` SourceFiles string `json:"source_files"` PublicHeaderFiles string `json:"public_header_files"` Frameworks string `json:"frameworks,omitempty"` Platforms struct { Ios string `json:"ios"` Osx string `json:"osx"` Tvos string `json:"tvos"` } `json:"platforms,omitempty"` Tvos struct { Dependencies struct { AFNetworkingReachability []interface{} `json:"AFNetworking/Reachability"` } `json:"dependencies"` } `json:"tvos,omitempty"` Dependencies struct { AFNetworkingSecurity []interface{} `json:"AFNetworking/Security"` AFNetworkingSerialization []interface{} `json:"AFNetworking/Serialization"` } `json:"dependencies,omitempty"` } `json:"subspecs"` Platforms struct { Ios string `json:"ios"` Osx string `json:"osx"` Tvos string `json:"tvos"` Watchos string `json:"watchos"` } `json:"platforms"` RequiresArc bool `json:"requires_arc"` SourceFiles string `json:"source_files"` SocialMediaURL string `json:"social_media_url"` PublicHeaderFiles string `json:"public_header_files"` PrefixHeaderContents string `json:"prefix_header_contents"` } `json:"spec"` }
IosLibrariesList represents a list of libraries
type LatestAnalysis ¶ added in v0.2.4
type LatestAnalysis struct { PlatformID string `json:"platform_id"` ApplicationKey string `json:"application_key"` BuildVersion string `json:"build_version"` LatestDynamicRecordedAt time.Time `json:"latest_dynamic_recorded_at"` LatestStaticRecordedAt time.Time `json:"latest_static_recorded_at"` ReportPath string `json:"report_path"` }
LatestAnalysis represents a single item in the list of latest analysis.
type LatestAnalysisList ¶ added in v0.2.4
type LatestAnalysisList []LatestAnalysis
LatestAnalysisList represents a list of latest analysis.
type LegacyService ¶ added in v0.2.4
type LegacyService service
LegacyService handles communication w.r.t. legacy API endpoints.
func (*LegacyService) GetLatestAnalysisList ¶ added in v0.2.4
func (s *LegacyService) GetLatestAnalysisList(ctx context.Context, platformIdentifier, applicationKey, listType string, since, until time.Time, pageNum, perPage int) (LatestAnalysisList, error)
GetLatestAnalysisList retrieves the latest analysis from Intel. https://docs.nowsecure.com/intel/api/spec/#api-Legacy-LatestAnalysis
type MetaDataService ¶
type MetaDataService service
MetaDataService handles communication regarding MetaData
type Monitor ¶
type Monitor struct { PlatformID string `json:"platform_id"` ApplicationKey string `json:"application_key"` RequestedAt time.Time `json:"requested_at"` ApprovedAt time.Time `json:"approved_at"` RequestedBy struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` } `json:"requested_by"` ApprovedBy struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` } `json:"approved_by"` Metadata struct { PlatformID string `json:"platform_id"` ApplicationKey string `json:"application_key"` PackageName string `json:"package_name"` Title string `json:"title"` LatestPublishedVersion string `json:"latest_published_version"` LatestReleaseDate string `json:"latest_release_date"` PublisherName string `json:"publisher_name"` IconURL string `json:"icon_url"` } `json:"metadata"` }
Monitor represents a monitor
type MonitorAnalysis ¶
type MonitorAnalysis struct { PlatformID string `json:"platform_id"` ApplicationKey string `json:"application_key"` BuildVersion string `json:"build_version"` LatestDynamicRecordedAt time.Time `json:"latest_dynamic_recorded_at"` LatestStaticRecordedAt time.Time `json:"latest_static_recorded_at"` ReportPath string `json:"report_path"` }
MonitorAnalysis represents the latest analysis for a monitor
type MonitorList ¶
type MonitorList []struct { MonitorRequestedAt time.Time `json:"monitor_requested_at"` MonitorApprovedAt time.Time `json:"monitor_approved_at"` MonitorExpiresAt time.Time `json:"monitor_expires_at"` PlatformID string `json:"platform_id"` PackageName string `json:"package_name"` ApplicationKey string `json:"application_key"` Title string `json:"title"` LatestPublishedVersion string `json:"latest_published_version"` LatestReleaseDate time.Time `json:"latest_release_date"` PublisherName string `json:"publisher_name"` IconURL string `json:"icon_url"` Startkey time.Time `json:"_startkey"` LatestAnalysisCreatedAt time.Time `json:"latest_analysis_created_at"` LatestReportBuildVersion string `json:"latest_report_build_version"` LatestReportReleaseVersion string `json:"latest_report_release_version"` }
MonitorList represents a list of monitors
type MonitorRequest ¶
type MonitorRequest struct { PlatformID string `json:"platform_id,omitempty"` ApplicationKey string `json:"application_key,omitempty"` }
MonitorRequest represents a request to create a monitor
type MonitorsService ¶
type MonitorsService service
MonitorsService handles communication regarding Monitors
func (*MonitorsService) Add ¶
func (s *MonitorsService) Add(ctx context.Context, mr MonitorRequest) (*Monitor, *http.Response, error)
Add a monitor for an app
func (*MonitorsService) Analysis ¶
func (s *MonitorsService) Analysis(ctx context.Context, since time.Time) (*[]MonitorAnalysis, *http.Response, error)
Analysis lists latest monitors with analysis
func (*MonitorsService) Delete ¶
func (s *MonitorsService) Delete(ctx context.Context, mr MonitorRequest) (*http.Response, error)
Delete a monitor for an app
func (*MonitorsService) Get ¶
func (s *MonitorsService) Get(ctx context.Context, mr MonitorRequest) (*Monitor, *http.Response, error)
Get a monitor for an app
func (*MonitorsService) List ¶
func (s *MonitorsService) List(ctx context.Context) (*MonitorList, *http.Response, error)
List monitors
type Publisher ¶
type Publisher struct { ID string `json:"publisher_id"` Name string `json:"publisher_name"` VendorEmail string `json:"vendor_email"` VendorURL string `json:"vendor_url"` VendorName string `json:"vendor_name"` ApplicationKeys []string `json:"application_keys"` ApplicationTitles []string `json:"application_titles"` }
Publisher defines a publisher
type ReportsService ¶
type ReportsService service
ReportsService handles communication regarding Reports
type SearchesService ¶
type SearchesService service
SearchesService handles communication regarding searches
func (*SearchesService) AndroidLibraries ¶
func (s *SearchesService) AndroidLibraries(ctx context.Context, classPrefix string, version string) (*AndroidLibrariesList, *http.Response, error)
AndroidLibraries search for 3rd Party Libraries for Android
func (*SearchesService) AndroidMetadata ¶
func (s *SearchesService) AndroidMetadata(ctx context.Context, search string) (*AndroidMetadata, *http.Response, error)
AndroidMetadata search
func (*SearchesService) IOSLibraries ¶
func (s *SearchesService) IOSLibraries(ctx context.Context, name string, version string) (*IosLibrariesList, *http.Response, error)
IOSLibraries search for 3rd Party Libraries for iOS
func (*SearchesService) IOSMetadata ¶
func (s *SearchesService) IOSMetadata(ctx context.Context, search string) (*IOSMetadata, *http.Response, error)
IOSMetadata search
type UserTokenRequest ¶
type UserTokenRequest struct {
Description string `json:"description,omitempty"`
}
UserTokenRequest represents a request to create a user token
type UsersService ¶
type UsersService service
UsersService handles communication regarding users
func (*UsersService) Add ¶
func (s *UsersService) Add(ctx context.Context, utr UserTokenRequest) (*UserToken, *http.Response, error)
Add a user token