Documentation
¶
Index ¶
- type Endpoint
- func (e *Endpoint) GetAllSubmissions() ([]Submission, error)
- func (e *Endpoint) GetProgramSubmissions(programId string) ([]Submission, error)
- func (e *Endpoint) GetPrograms() ([]Program, error)
- func (e *Endpoint) GetToken() (*oauth2.Token, error)
- func (e *Endpoint) IsAuthenticated() bool
- func (e *Endpoint) IsKnownIP(ip net.IP) (bool, error)
- type Program
- type Submission
- type TaggedRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func New ¶
New creates an Intigriti endpoint object to use this is the main object to interact with the SDK
func (*Endpoint) GetAllSubmissions ¶ added in v1.4.7
func (e *Endpoint) GetAllSubmissions() ([]Submission, error)
GetAllSubmissions returns all submissions for all programs
func (*Endpoint) GetProgramSubmissions ¶ added in v1.4.7
func (e *Endpoint) GetProgramSubmissions(programId string) ([]Submission, error)
GetProgramSubmissions returns all submissions for the given program identifier
func (*Endpoint) GetPrograms ¶
GetPrograms returns all Intigriti programs for the current company
func (*Endpoint) GetToken ¶ added in v1.4.6
GetToken fetch the latest (valid) oauth2 access and refresh token
func (*Endpoint) IsAuthenticated ¶
IsAuthenticated returns whether the current SDK instance has successfully authenticated
type Program ¶
type Program struct {
ID string `json:"id"`
Handle string `json:"handle"`
CompanyID string `json:"companyId"`
CompanyHandle string `json:"companyHandle"`
LogoURL string `json:"logoUrl"`
Name string `json:"name"`
Status struct {
ID int `json:"id"`
Value string `json:"value"`
} `json:"status"`
ConfidentialityLevel struct {
ID int `json:"id"`
Value string `json:"value"`
} `json:"confidentialityLevel"`
WebLinks struct {
Details string `json:"details"`
} `json:"webLinks"`
Type struct {
ID int `json:"id"`
Value string `json:"value"`
} `json:"type"`
}
type Submission ¶
type Submission struct {
Code string `json:"code"`
InternalReference interface{} `json:"internalReference"`
Title string `json:"title"`
ProgramID string `json:"programId"`
Severity struct {
ID int `json:"id"`
Vector interface{} `json:"vector"`
Value string `json:"value"`
} `json:"severity"`
State struct {
Status struct {
ID int `json:"id"`
Value string `json:"value"`
} `json:"status"`
CloseReason struct {
ID int `json:"id"`
Value string `json:"value"`
} `json:"closeReason"`
} `json:"state"`
TotalPayout struct {
Value float64 `json:"value"`
Currency string `json:"currency"`
} `json:"totalPayout"`
CreatedAt int `json:"createdAt"`
LastUpdatedAt int `json:"lastUpdatedAt"`
AwaitingFeedback bool `json:"awaitingFeedback"`
Destroyed bool `json:"destroyed"`
Assignee struct {
AvatarURL string `json:"avatarUrl"`
Email string `json:"email"`
Role string `json:"role"`
UserID string `json:"userId"`
Username string `json:"userName"`
} `json:"assignee"`
Tags []interface{} `json:"tags"`
GroupID interface{} `json:"groupId"`
Submitter struct {
Ranking struct {
Rank int `json:"rank"`
Reputation int `json:"reputation"`
Streak interface{} `json:"streak"`
} `json:"ranking"`
IdentityChecked bool `json:"identityChecked"`
UserID string `json:"userId"`
UserName string `json:"userName"`
AvatarURL string `json:"avatarUrl"`
Role string `json:"role"`
} `json:"submitter"`
CollaboratorCount int `json:"collaboratorCount"`
WebLinks struct {
Details string `json:"details"`
} `json:"webLinks"`
}
func (*Submission) IsActive ¶
func (s *Submission) IsActive() bool
func (*Submission) IsClosed ¶
func (s *Submission) IsClosed() bool
type TaggedRoundTripper ¶
type TaggedRoundTripper struct {
Proxied http.RoundTripper
Logger *logrus.Logger
}
Click to show internal directories.
Click to hide internal directories.