Documentation ¶
Index ¶
- type AlertRepository
- type Client
- func (c *Client) AttachAccessTokenRole(ctx context.Context, projectID, roleID, accessTokenID uint32) (*model.AccessTokenRole, error)
- func (c *Client) AttachAllAdminRole(ctx context.Context, userID uint32) error
- func (c *Client) AttachPolicy(ctx context.Context, projectID, roleID, policyID uint32) (*model.RolePolicy, error)
- func (c *Client) AttachRole(ctx context.Context, projectID, roleID, userID uint32) (*model.UserRole, error)
- func (c *Client) BatchListFinding(ctx context.Context, req *finding.BatchListFindingRequest) (*[]model.Finding, error)
- func (c *Client) BulkUpsertFinding(ctx context.Context, data []*model.Finding) error
- func (c *Client) BulkUpsertFindingTag(ctx context.Context, data []*model.FindingTag) error
- func (c *Client) BulkUpsertRecommend(ctx context.Context, data []*model.Recommend) error
- func (c *Client) BulkUpsertRecommendFinding(ctx context.Context, data []*model.RecommendFinding) error
- func (c *Client) BulkUpsertResource(ctx context.Context, data []*model.Resource) error
- func (c *Client) BulkUpsertResourceTag(ctx context.Context, data []*model.ResourceTag) error
- func (c *Client) CleanWithNoProject(ctx context.Context) error
- func (c *Client) ClearScoreFinding(ctx context.Context, req *finding.ClearScoreRequest) error
- func (c *Client) CollectReportFinding(ctx context.Context) error
- func (c *Client) CreateProject(ctx context.Context, name string) (*model.Project, error)
- func (c *Client) CreateUser(ctx context.Context, u *model.User) (*model.User, error)
- func (c *Client) DeactivateAlert(ctx context.Context, data *model.Alert) error
- func (c *Client) DeleteAccessToken(ctx context.Context, projectID, accessTokenID uint32) error
- func (c *Client) DeleteAlert(ctx context.Context, projectID uint32, alertID uint32) error
- func (c *Client) DeleteAlertCondNotification(ctx context.Context, projectID, alertConditionID, notificationID uint32) error
- func (c *Client) DeleteAlertCondRule(ctx context.Context, projectID, alertConditionID, alertRuleID uint32) error
- func (c *Client) DeleteAlertCondition(ctx context.Context, projectID uint32, alertConditionID uint32) error
- func (c *Client) DeleteAlertHistory(ctx context.Context, projectID uint32, alertHistoryID uint32) error
- func (c *Client) DeleteAlertRule(ctx context.Context, projectID uint32, alertRuleID uint32) error
- func (c *Client) DeleteFinding(ctx context.Context, projectID uint32, findingID uint64) error
- func (c *Client) DeleteFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) error
- func (c *Client) DeleteNoFindingIdTag(ctx context.Context) error
- func (c *Client) DeleteNoResourceIdTag(ctx context.Context) error
- func (c *Client) DeleteNotification(ctx context.Context, projectID uint32, NotificationID uint32) error
- func (c *Client) DeleteOldFinding(ctx context.Context, excludeDataSource []string) error
- func (c *Client) DeleteOldResource(ctx context.Context, excludeDataSource []string) error
- func (c *Client) DeletePendFinding(ctx context.Context, projectID uint32, findingID uint64) error
- func (c *Client) DeletePolicy(ctx context.Context, projectID, policyID uint32) error
- func (c *Client) DeleteProject(ctx context.Context, projectID uint32) error
- func (c *Client) DeleteRelAlertFinding(ctx context.Context, projectID, alertID uint32, findingID uint64) error
- func (c *Client) DeleteResource(ctx context.Context, projectID uint32, resourceID uint64) error
- func (c *Client) DeleteRole(ctx context.Context, projectID, roleID uint32) error
- func (c *Client) DeleteTagByFindingID(ctx context.Context, projectID uint32, findingID uint64) error
- func (c *Client) DeleteTagByResourceID(ctx context.Context, projectID uint32, resourceID uint64) error
- func (c *Client) DeleteUserReserved(ctx context.Context, projectID, reservedID uint32) error
- func (c *Client) DetachAccessTokenRole(ctx context.Context, projectID, roleID, accessTokenID uint32) error
- func (c *Client) DetachPolicy(ctx context.Context, projectID, roleID, policyID uint32) error
- func (c *Client) DetachRole(ctx context.Context, projectID, roleID, userID uint32) error
- func (c *Client) ExistsAccessTokenMaintainer(ctx context.Context, projectID, accessTokenID uint32) (bool, error)
- func (c *Client) GetAccessTokenByID(ctx context.Context, projectID, accessTokenID uint32) (*model.AccessToken, error)
- func (c *Client) GetAccessTokenByUniqueKey(ctx context.Context, projectID uint32, name string) (*model.AccessToken, error)
- func (c *Client) GetAccessTokenRole(ctx context.Context, accessTokenID, roleID uint32) (*model.AccessTokenRole, error)
- func (c *Client) GetActiveAccessTokenHash(ctx context.Context, projectID, accessTokenID uint32, tokenHash string) (*model.AccessToken, error)
- func (c *Client) GetActiveUserCount(ctx context.Context) (*int, error)
- func (c *Client) GetAdminPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error)
- func (c *Client) GetAlert(ctx context.Context, projectID uint32, alertID uint32) (*model.Alert, error)
- func (c *Client) GetAlertByAlertConditionIDStatus(ctx context.Context, projectID uint32, AlertConditionID uint32, ...) (*model.Alert, error)
- func (c *Client) GetAlertCondNotification(ctx context.Context, projectID, alertConditionID, notificationID uint32) (*model.AlertCondNotification, error)
- func (c *Client) GetAlertCondRule(ctx context.Context, projectID, alertConditionID, alertRuleID uint32) (*model.AlertCondRule, error)
- func (c *Client) GetAlertCondition(ctx context.Context, projectID uint32, alertConditionID uint32) (*model.AlertCondition, error)
- func (c *Client) GetAlertHistory(ctx context.Context, projectID uint32, alertHistoryID uint32) (*model.AlertHistory, error)
- func (c *Client) GetAlertRule(ctx context.Context, projectID uint32, alertRuleID uint32) (*model.AlertRule, error)
- func (c *Client) GetFinding(ctx context.Context, projectID uint32, findingID uint64, immediately bool) (*model.Finding, error)
- func (c *Client) GetFindingByDataSource(ctx context.Context, projectID uint32, dataSource, dataSourceID string) (*model.Finding, error)
- func (c *Client) GetFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) (*model.FindingSetting, error)
- func (c *Client) GetFindingSettingByResource(ctx context.Context, projectID uint32, resourceName string) (*model.FindingSetting, error)
- func (c *Client) GetFindingTagByKey(ctx context.Context, projectID uint32, findingID uint64, tag string) (*model.FindingTag, error)
- func (c *Client) GetNotification(ctx context.Context, projectID uint32, NotificationID uint32) (*model.Notification, error)
- func (c *Client) GetPendFinding(ctx context.Context, projectID uint32, findingID uint64) (*model.PendFinding, error)
- func (c *Client) GetPolicy(ctx context.Context, projectID, policyID uint32) (*model.Policy, error)
- func (c *Client) GetPolicyByName(ctx context.Context, projectID uint32, name string) (*model.Policy, error)
- func (c *Client) GetProjectByName(ctx context.Context, name string) (*model.Project, error)
- func (c *Client) GetProjectTag(ctx context.Context, projectID uint32, tag string) (*model.ProjectTag, error)
- func (c *Client) GetRecommend(ctx context.Context, projectID uint32, findingID uint64) (*model.Recommend, error)
- func (c *Client) GetRecommendByDataSourceType(ctx context.Context, dataSource, recommendType string) (*model.Recommend, error)
- func (c *Client) GetRelAlertFinding(ctx context.Context, projectID, alertID uint32, findingID uint64) (*model.RelAlertFinding, error)
- func (c *Client) GetReportFinding(ctx context.Context, projectID uint32, dataSource []string, ...) (*[]model.ReportFinding, error)
- func (c *Client) GetReportFindingAll(ctx context.Context, dataSource []string, fromDate, toDate string, ...) (*[]model.ReportFinding, error)
- func (c *Client) GetResource(ctx context.Context, projectID uint32, resourceID uint64) (*model.Resource, error)
- func (c *Client) GetResourceByName(ctx context.Context, projectID uint32, resourceName string) (*model.Resource, error)
- func (c *Client) GetResourceTagByKey(ctx context.Context, projectID uint32, resourceID uint64, tag string) (*model.ResourceTag, error)
- func (c *Client) GetRole(ctx context.Context, projectID, roleID uint32) (*model.Role, error)
- func (c *Client) GetRoleByName(ctx context.Context, projectID uint32, name string) (*model.Role, error)
- func (c *Client) GetRolePolicy(ctx context.Context, projectID, roleID, policyID uint32) (*model.RolePolicy, error)
- func (c *Client) GetTokenPolicy(ctx context.Context, accessTokenID uint32) (*[]model.Policy, error)
- func (c *Client) GetUser(ctx context.Context, userID uint32, sub, userIdpKey string) (*model.User, error)
- func (c *Client) GetUserBySub(ctx context.Context, sub string) (*model.User, error)
- func (c *Client) GetUserByUserIdpKey(ctx context.Context, userIdpKey string) (*model.User, error)
- func (c *Client) GetUserPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error)
- func (c *Client) GetUserRole(ctx context.Context, projectID, userID, roleID uint32) (*model.UserRole, error)
- func (c *Client) ListAccessToken(ctx context.Context, projectID uint32, name string, accessTokenID uint32) (*[]model.AccessToken, error)
- func (c *Client) ListAlert(ctx context.Context, projectID uint32, status []string, severity []string, ...) (*[]model.Alert, error)
- func (c *Client) ListAlertCondNotification(ctx context.Context, projectID, alertConditionID, notificationID uint32, ...) (*[]model.AlertCondNotification, error)
- func (c *Client) ListAlertCondRule(ctx context.Context, projectID, alertConditionID, alertRuleID uint32, ...) (*[]model.AlertCondRule, error)
- func (c *Client) ListAlertCondition(ctx context.Context, projectID uint32, severity []string, enabled bool, ...) (*[]model.AlertCondition, error)
- func (c *Client) ListAlertHistory(ctx context.Context, projectID, alertID uint32, historyType string, ...) (*[]model.AlertHistory, error)
- func (c *Client) ListAlertRule(ctx context.Context, projectID uint32, fromScore, toScore float32, ...) (*[]model.AlertRule, error)
- func (c *Client) ListAlertRuleByAlertConditionID(ctx context.Context, projectID, alertConditionID uint32) (*[]model.AlertRule, error)
- func (c *Client) ListDisabledAlertCondition(ctx context.Context, projectID uint32, alertConditionID []uint32) (*[]model.AlertCondition, error)
- func (c *Client) ListEnabledAlertCondition(ctx context.Context, projectID uint32, alertConditionID []uint32) (*[]model.AlertCondition, error)
- func (c *Client) ListExpiredAccessToken(ctx context.Context) (*[]model.AccessToken, error)
- func (c *Client) ListFinding(ctx context.Context, req *finding.ListFindingRequest) (*[]model.Finding, error)
- func (c *Client) ListFindingCount(ctx context.Context, projectID, alertID uint32, fromScore, toScore float32, ...) (int64, error)
- func (c *Client) ListFindingSetting(ctx context.Context, req *finding.ListFindingSettingRequest) (*[]model.FindingSetting, error)
- func (c *Client) ListFindingTag(ctx context.Context, param *finding.ListFindingTagRequest) (*[]model.FindingTag, error)
- func (c *Client) ListFindingTagByFindingID(ctx context.Context, projectID uint32, findingID uint64) (*[]model.FindingTag, error)
- func (c *Client) ListFindingTagCount(ctx context.Context, param *finding.ListFindingTagRequest) (int64, error)
- func (c *Client) ListFindingTagName(ctx context.Context, param *finding.ListFindingTagNameRequest) (*[]TagName, error)
- func (c *Client) ListFindingTagNameCount(ctx context.Context, param *finding.ListFindingTagNameRequest) (int64, error)
- func (c *Client) ListNotification(ctx context.Context, projectID uint32, notifyType string, fromAt, toAt int64) (*[]model.Notification, error)
- func (c *Client) ListPolicy(ctx context.Context, projectID uint32, name string, roleID uint32) (*[]model.Policy, error)
- func (c *Client) ListProject(ctx context.Context, userID, projectID uint32, name string) (*[]ProjectWithTag, error)
- func (c *Client) ListRelAlertFinding(ctx context.Context, projectID, alertID uint32, findingID uint64, ...) (*[]model.RelAlertFinding, error)
- func (c *Client) ListResource(ctx context.Context, req *finding.ListResourceRequest) (*[]model.Resource, error)
- func (c *Client) ListResourceCount(ctx context.Context, req *finding.ListResourceRequest) (int64, error)
- func (c *Client) ListResourceTag(ctx context.Context, param *finding.ListResourceTagRequest) (*[]model.ResourceTag, error)
- func (c *Client) ListResourceTagByResourceID(ctx context.Context, projectID uint32, resourceID uint64) (*[]model.ResourceTag, error)
- func (c *Client) ListResourceTagCount(ctx context.Context, param *finding.ListResourceTagRequest) (int64, error)
- func (c *Client) ListResourceTagName(ctx context.Context, param *finding.ListResourceTagNameRequest) (*[]TagName, error)
- func (c *Client) ListResourceTagNameCount(ctx context.Context, param *finding.ListResourceTagNameRequest) (int64, error)
- func (c *Client) ListRole(ctx context.Context, projectID uint32, name string, userID uint32, ...) (*[]model.Role, error)
- func (c *Client) ListUser(ctx context.Context, activated bool, projectID uint32, name string, ...) (*[]model.User, error)
- func (c *Client) ListUserReserved(ctx context.Context, projectID uint32, userIdpKey string) (*[]model.UserReserved, error)
- func (c *Client) ListUserReservedWithProjectID(ctx context.Context, userIdpKey string) (*[]UserReservedWithProjectID, error)
- func (c *Client) PurgeReportFinding(ctx context.Context) error
- func (c *Client) PutAccessToken(ctx context.Context, r *model.AccessToken) (*model.AccessToken, error)
- func (c *Client) PutPolicy(ctx context.Context, p *model.Policy) (*model.Policy, error)
- func (c *Client) PutRole(ctx context.Context, r *model.Role) (*model.Role, error)
- func (c *Client) PutUser(ctx context.Context, u *model.User) (*model.User, error)
- func (c *Client) PutUserReserved(ctx context.Context, data *model.UserReserved) (*model.UserReserved, error)
- func (c *Client) TagFinding(ctx context.Context, tag *model.FindingTag) (*model.FindingTag, error)
- func (c *Client) TagProject(ctx context.Context, projectID uint32, tag, color string) (*model.ProjectTag, error)
- func (c *Client) TagResource(ctx context.Context, tag *model.ResourceTag) (*model.ResourceTag, error)
- func (c *Client) UntagFinding(ctx context.Context, projectID uint32, findingTagID uint64) error
- func (c *Client) UntagProject(ctx context.Context, projectID uint32, tag string) error
- func (c *Client) UntagResource(ctx context.Context, projectID uint32, resourceTagID uint64) error
- func (c *Client) UpdateAlertFirstViewedAt(ctx context.Context, projectID, alertID uint32, viewedAt int64) error
- func (c *Client) UpdateProject(ctx context.Context, projectID uint32, name string) (*model.Project, error)
- func (c *Client) UpsertAlert(ctx context.Context, data *model.Alert) (*model.Alert, error)
- func (c *Client) UpsertAlertCondNotification(ctx context.Context, data *model.AlertCondNotification) (*model.AlertCondNotification, error)
- func (c *Client) UpsertAlertCondRule(ctx context.Context, data *model.AlertCondRule) (*model.AlertCondRule, error)
- func (c *Client) UpsertAlertCondition(ctx context.Context, data *model.AlertCondition) (*model.AlertCondition, error)
- func (c *Client) UpsertAlertHistory(ctx context.Context, data *model.AlertHistory) (*model.AlertHistory, error)
- func (c *Client) UpsertAlertRule(ctx context.Context, data *model.AlertRule) (*model.AlertRule, error)
- func (c *Client) UpsertFinding(ctx context.Context, data *model.Finding) (*model.Finding, error)
- func (c *Client) UpsertFindingSetting(ctx context.Context, data *model.FindingSetting) (*model.FindingSetting, error)
- func (c *Client) UpsertNotification(ctx context.Context, data *model.Notification) (*model.Notification, error)
- func (c *Client) UpsertPendFinding(ctx context.Context, findingID uint64, projectID uint32, pendUserID uint32, ...) (*model.PendFinding, error)
- func (c *Client) UpsertRecommend(ctx context.Context, data *model.Recommend) (*model.Recommend, error)
- func (c *Client) UpsertRecommendFinding(ctx context.Context, data *model.RecommendFinding) (*model.RecommendFinding, error)
- func (c *Client) UpsertRelAlertFinding(ctx context.Context, data *model.RelAlertFinding) (*model.RelAlertFinding, error)
- func (c *Client) UpsertResource(ctx context.Context, data *model.Resource) (*model.Resource, error)
- type Config
- type FindingRepository
- type IAMRepository
- type ProjectRepository
- type ProjectWithTag
- type ReportRepository
- type TagName
- type UserReservedWithProjectID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertRepository ¶
type AlertRepository interface { // Alert ListAlert(context.Context, uint32, []string, []string, string, int64, int64) (*[]model.Alert, error) GetAlert(context.Context, uint32, uint32) (*model.Alert, error) UpsertAlert(context.Context, *model.Alert) (*model.Alert, error) UpdateAlertFirstViewedAt(context.Context, uint32, uint32, int64) error DeleteAlert(context.Context, uint32, uint32) error ListAlertHistory(context.Context, uint32, uint32, string, uint32) (*[]model.AlertHistory, error) GetAlertHistory(context.Context, uint32, uint32) (*model.AlertHistory, error) UpsertAlertHistory(context.Context, *model.AlertHistory) (*model.AlertHistory, error) DeleteAlertHistory(context.Context, uint32, uint32) error ListRelAlertFinding(context.Context, uint32, uint32, uint64, int64, int64) (*[]model.RelAlertFinding, error) GetRelAlertFinding(context.Context, uint32, uint32, uint64) (*model.RelAlertFinding, error) UpsertRelAlertFinding(context.Context, *model.RelAlertFinding) (*model.RelAlertFinding, error) DeleteRelAlertFinding(context.Context, uint32, uint32, uint64) error ListAlertCondition(context.Context, uint32, []string, bool, int64, int64) (*[]model.AlertCondition, error) GetAlertCondition(context.Context, uint32, uint32) (*model.AlertCondition, error) UpsertAlertCondition(context.Context, *model.AlertCondition) (*model.AlertCondition, error) DeleteAlertCondition(context.Context, uint32, uint32) error ListAlertRule(context.Context, uint32, float32, float32, int64, int64) (*[]model.AlertRule, error) GetAlertRule(context.Context, uint32, uint32) (*model.AlertRule, error) UpsertAlertRule(context.Context, *model.AlertRule) (*model.AlertRule, error) DeleteAlertRule(context.Context, uint32, uint32) error ListAlertCondRule(context.Context, uint32, uint32, uint32, int64, int64) (*[]model.AlertCondRule, error) GetAlertCondRule(context.Context, uint32, uint32, uint32) (*model.AlertCondRule, error) UpsertAlertCondRule(context.Context, *model.AlertCondRule) (*model.AlertCondRule, error) DeleteAlertCondRule(context.Context, uint32, uint32, uint32) error ListNotification(context.Context, uint32, string, int64, int64) (*[]model.Notification, error) GetNotification(context.Context, uint32, uint32) (*model.Notification, error) UpsertNotification(context.Context, *model.Notification) (*model.Notification, error) DeleteNotification(context.Context, uint32, uint32) error ListAlertCondNotification(context.Context, uint32, uint32, uint32, int64, int64) (*[]model.AlertCondNotification, error) GetAlertCondNotification(context.Context, uint32, uint32, uint32) (*model.AlertCondNotification, error) UpsertAlertCondNotification(context.Context, *model.AlertCondNotification) (*model.AlertCondNotification, error) DeleteAlertCondNotification(context.Context, uint32, uint32, uint32) error // forAnalyze ListAlertRuleByAlertConditionID(context.Context, uint32, uint32) (*[]model.AlertRule, error) DeactivateAlert(context.Context, *model.Alert) error GetAlertByAlertConditionIDStatus(context.Context, uint32, uint32, []string) (*model.Alert, error) ListEnabledAlertCondition(context.Context, uint32, []uint32) (*[]model.AlertCondition, error) ListDisabledAlertCondition(context.Context, uint32, []uint32) (*[]model.AlertCondition, error) }
type Client ¶
func (*Client) AttachAccessTokenRole ¶
func (*Client) AttachAllAdminRole ¶
func (*Client) AttachPolicy ¶
func (*Client) AttachRole ¶
func (*Client) BatchListFinding ¶
func (*Client) BulkUpsertFinding ¶
func (*Client) BulkUpsertFindingTag ¶
func (*Client) BulkUpsertRecommend ¶
func (*Client) BulkUpsertRecommendFinding ¶
func (*Client) BulkUpsertResource ¶
func (*Client) BulkUpsertResourceTag ¶
func (*Client) CleanWithNoProject ¶ added in v0.5.0
func (*Client) ClearScoreFinding ¶
func (*Client) CollectReportFinding ¶
func (*Client) CreateProject ¶
func (*Client) CreateUser ¶ added in v0.5.0
func (*Client) DeactivateAlert ¶
func (*Client) DeleteAccessToken ¶
func (*Client) DeleteAlert ¶
func (*Client) DeleteAlertCondNotification ¶
func (*Client) DeleteAlertCondRule ¶
func (*Client) DeleteAlertCondition ¶
func (*Client) DeleteAlertHistory ¶
func (*Client) DeleteAlertRule ¶
func (*Client) DeleteFinding ¶
func (*Client) DeleteFindingSetting ¶
func (*Client) DeleteNoFindingIdTag ¶ added in v0.9.0
func (*Client) DeleteNoResourceIdTag ¶ added in v0.9.0
func (*Client) DeleteNotification ¶
func (*Client) DeleteOldFinding ¶ added in v0.9.0
func (*Client) DeleteOldResource ¶ added in v0.9.0
func (*Client) DeletePendFinding ¶
func (*Client) DeletePolicy ¶
func (*Client) DeleteProject ¶ added in v0.5.0
func (*Client) DeleteRelAlertFinding ¶
func (*Client) DeleteResource ¶
func (*Client) DeleteRole ¶
func (*Client) DeleteTagByFindingID ¶
func (*Client) DeleteTagByResourceID ¶
func (*Client) DeleteUserReserved ¶ added in v0.5.0
func (*Client) DetachAccessTokenRole ¶
func (*Client) DetachPolicy ¶
func (*Client) DetachRole ¶
func (*Client) ExistsAccessTokenMaintainer ¶
func (*Client) GetAccessTokenByID ¶
func (*Client) GetAccessTokenByUniqueKey ¶
func (*Client) GetAccessTokenRole ¶
func (*Client) GetActiveAccessTokenHash ¶
func (*Client) GetActiveUserCount ¶
func (*Client) GetAdminPolicy ¶
func (*Client) GetAlertByAlertConditionIDStatus ¶
func (*Client) GetAlertCondNotification ¶
func (*Client) GetAlertCondRule ¶
func (*Client) GetAlertCondition ¶
func (*Client) GetAlertHistory ¶
func (*Client) GetAlertRule ¶
func (*Client) GetFinding ¶
func (*Client) GetFindingByDataSource ¶
func (*Client) GetFindingSetting ¶
func (*Client) GetFindingSettingByResource ¶
func (*Client) GetFindingTagByKey ¶
func (*Client) GetNotification ¶
func (*Client) GetPendFinding ¶
func (*Client) GetPolicyByName ¶
func (*Client) GetProjectByName ¶
func (*Client) GetProjectTag ¶
func (*Client) GetRecommend ¶
func (*Client) GetRecommendByDataSourceType ¶
func (*Client) GetRelAlertFinding ¶
func (*Client) GetReportFinding ¶
func (*Client) GetReportFindingAll ¶
func (*Client) GetResource ¶
func (*Client) GetResourceByName ¶
func (*Client) GetResourceTagByKey ¶
func (*Client) GetRoleByName ¶
func (*Client) GetRolePolicy ¶
func (*Client) GetTokenPolicy ¶
func (*Client) GetUserBySub ¶
func (*Client) GetUserByUserIdpKey ¶ added in v0.5.0
func (*Client) GetUserPolicy ¶
func (*Client) GetUserRole ¶
func (*Client) ListAccessToken ¶
func (*Client) ListAlertCondNotification ¶
func (*Client) ListAlertCondRule ¶
func (*Client) ListAlertCondition ¶
func (*Client) ListAlertHistory ¶
func (*Client) ListAlertRule ¶
func (*Client) ListAlertRuleByAlertConditionID ¶
func (*Client) ListDisabledAlertCondition ¶
func (*Client) ListEnabledAlertCondition ¶
func (*Client) ListExpiredAccessToken ¶
func (*Client) ListFinding ¶
func (*Client) ListFindingCount ¶
func (*Client) ListFindingSetting ¶
func (c *Client) ListFindingSetting(ctx context.Context, req *finding.ListFindingSettingRequest) (*[]model.FindingSetting, error)
func (*Client) ListFindingTag ¶
func (c *Client) ListFindingTag(ctx context.Context, param *finding.ListFindingTagRequest) (*[]model.FindingTag, error)
func (*Client) ListFindingTagByFindingID ¶
func (*Client) ListFindingTagCount ¶
func (*Client) ListFindingTagName ¶
func (*Client) ListFindingTagNameCount ¶
func (*Client) ListNotification ¶
func (*Client) ListPolicy ¶
func (*Client) ListProject ¶
func (*Client) ListRelAlertFinding ¶
func (*Client) ListResource ¶
func (*Client) ListResourceCount ¶
func (*Client) ListResourceTag ¶
func (c *Client) ListResourceTag(ctx context.Context, param *finding.ListResourceTagRequest) (*[]model.ResourceTag, error)
func (*Client) ListResourceTagByResourceID ¶
func (*Client) ListResourceTagCount ¶
func (*Client) ListResourceTagName ¶
func (*Client) ListResourceTagNameCount ¶
func (*Client) ListUserReserved ¶ added in v0.5.0
func (*Client) ListUserReservedWithProjectID ¶ added in v0.5.0
func (*Client) PurgeReportFinding ¶ added in v0.7.0
func (*Client) PutAccessToken ¶
func (c *Client) PutAccessToken(ctx context.Context, r *model.AccessToken) (*model.AccessToken, error)
func (*Client) PutUserReserved ¶ added in v0.5.0
func (c *Client) PutUserReserved(ctx context.Context, data *model.UserReserved) (*model.UserReserved, error)
func (*Client) TagFinding ¶
func (c *Client) TagFinding(ctx context.Context, tag *model.FindingTag) (*model.FindingTag, error)
func (*Client) TagProject ¶
func (*Client) TagResource ¶
func (c *Client) TagResource(ctx context.Context, tag *model.ResourceTag) (*model.ResourceTag, error)
func (*Client) UntagFinding ¶
func (*Client) UntagProject ¶
func (*Client) UntagResource ¶
func (*Client) UpdateAlertFirstViewedAt ¶ added in v0.10.0
func (*Client) UpdateProject ¶
func (*Client) UpsertAlert ¶
func (*Client) UpsertAlertCondNotification ¶
func (c *Client) UpsertAlertCondNotification(ctx context.Context, data *model.AlertCondNotification) (*model.AlertCondNotification, error)
func (*Client) UpsertAlertCondRule ¶
func (c *Client) UpsertAlertCondRule(ctx context.Context, data *model.AlertCondRule) (*model.AlertCondRule, error)
func (*Client) UpsertAlertCondition ¶
func (c *Client) UpsertAlertCondition(ctx context.Context, data *model.AlertCondition) (*model.AlertCondition, error)
func (*Client) UpsertAlertHistory ¶
func (c *Client) UpsertAlertHistory(ctx context.Context, data *model.AlertHistory) (*model.AlertHistory, error)
func (*Client) UpsertAlertRule ¶
func (*Client) UpsertFinding ¶
func (*Client) UpsertFindingSetting ¶
func (c *Client) UpsertFindingSetting(ctx context.Context, data *model.FindingSetting) (*model.FindingSetting, error)
func (*Client) UpsertNotification ¶
func (c *Client) UpsertNotification(ctx context.Context, data *model.Notification) (*model.Notification, error)
func (*Client) UpsertPendFinding ¶
func (*Client) UpsertRecommend ¶
func (*Client) UpsertRecommendFinding ¶
func (c *Client) UpsertRecommendFinding(ctx context.Context, data *model.RecommendFinding) (*model.RecommendFinding, error)
func (*Client) UpsertRelAlertFinding ¶
func (c *Client) UpsertRelAlertFinding(ctx context.Context, data *model.RelAlertFinding) (*model.RelAlertFinding, error)
type FindingRepository ¶
type FindingRepository interface { // Finding ListFinding(context.Context, *finding.ListFindingRequest) (*[]model.Finding, error) BatchListFinding(context.Context, *finding.BatchListFindingRequest) (*[]model.Finding, error) ListFindingCount( ctx context.Context, projectID, alertID uint32, fromScore, toScore float32, findingID uint64, dataSources, resourceNames, tags []string, status finding.FindingStatus, ) (int64, error) GetFinding(context.Context, uint32, uint64, bool) (*model.Finding, error) GetFindingByDataSource(context.Context, uint32, string, string) (*model.Finding, error) UpsertFinding(context.Context, *model.Finding) (*model.Finding, error) DeleteFinding(context.Context, uint32, uint64) error ListFindingTag(ctx context.Context, param *finding.ListFindingTagRequest) (*[]model.FindingTag, error) ListFindingTagByFindingID(ctx context.Context, projectID uint32, findingID uint64) (*[]model.FindingTag, error) ListFindingTagCount(ctx context.Context, param *finding.ListFindingTagRequest) (int64, error) ListFindingTagName(ctx context.Context, param *finding.ListFindingTagNameRequest) (*[]TagName, error) ListFindingTagNameCount(ctx context.Context, param *finding.ListFindingTagNameRequest) (int64, error) GetFindingTagByKey(context.Context, uint32, uint64, string) (*model.FindingTag, error) TagFinding(context.Context, *model.FindingTag) (*model.FindingTag, error) UntagFinding(context.Context, uint32, uint64) error ClearScoreFinding(ctx context.Context, req *finding.ClearScoreRequest) error BulkUpsertFinding(ctx context.Context, data []*model.Finding) error BulkUpsertFindingTag(ctx context.Context, data []*model.FindingTag) error // Resource ListResource(context.Context, *finding.ListResourceRequest) (*[]model.Resource, error) ListResourceCount(ctx context.Context, req *finding.ListResourceRequest) (int64, error) GetResource(context.Context, uint32, uint64) (*model.Resource, error) GetResourceByName(context.Context, uint32, string) (*model.Resource, error) UpsertResource(context.Context, *model.Resource) (*model.Resource, error) DeleteResource(context.Context, uint32, uint64) error ListResourceTag(ctx context.Context, param *finding.ListResourceTagRequest) (*[]model.ResourceTag, error) ListResourceTagByResourceID(ctx context.Context, projectID uint32, resourceID uint64) (*[]model.ResourceTag, error) ListResourceTagCount(ctx context.Context, param *finding.ListResourceTagRequest) (int64, error) ListResourceTagName(ctx context.Context, param *finding.ListResourceTagNameRequest) (*[]TagName, error) ListResourceTagNameCount(ctx context.Context, param *finding.ListResourceTagNameRequest) (int64, error) GetResourceTagByKey(context.Context, uint32, uint64, string) (*model.ResourceTag, error) TagResource(context.Context, *model.ResourceTag) (*model.ResourceTag, error) UntagResource(context.Context, uint32, uint64) error BulkUpsertResource(ctx context.Context, data []*model.Resource) error BulkUpsertResourceTag(ctx context.Context, data []*model.ResourceTag) error // PendFinding GetPendFinding(ctx context.Context, projectID uint32, findingID uint64) (*model.PendFinding, error) UpsertPendFinding(ctx context.Context, findingID uint64, projectID uint32, pendUserID uint32, note string, reason string, expiredAtInt int64) (*model.PendFinding, error) DeletePendFinding(ctx context.Context, projectID uint32, findingID uint64) error // FindingSetting ListFindingSetting(ctx context.Context, req *finding.ListFindingSettingRequest) (*[]model.FindingSetting, error) GetFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) (*model.FindingSetting, error) GetFindingSettingByResource(ctx context.Context, projectID uint32, resourceName string) (*model.FindingSetting, error) UpsertFindingSetting(ctx context.Context, data *model.FindingSetting) (*model.FindingSetting, error) DeleteFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) error // Recommend GetRecommend(ctx context.Context, projectID uint32, findingID uint64) (*model.Recommend, error) UpsertRecommend(ctx context.Context, data *model.Recommend) (*model.Recommend, error) UpsertRecommendFinding(ctx context.Context, data *model.RecommendFinding) (*model.RecommendFinding, error) GetRecommendByDataSourceType(ctx context.Context, dataSource, recommendType string) (*model.Recommend, error) BulkUpsertRecommend(ctx context.Context, data []*model.Recommend) error BulkUpsertRecommendFinding(ctx context.Context, data []*model.RecommendFinding) error // Clean DeleteOldResource(ctx context.Context, excludeDataSource []string) error DeleteNoResourceIdTag(ctx context.Context) error DeleteOldFinding(ctx context.Context, excludeDataSource []string) error DeleteNoFindingIdTag(ctx context.Context) error }
type IAMRepository ¶
type IAMRepository interface { // User ListUser(ctx context.Context, activated bool, projectID uint32, name string, userID uint32, admin bool, userIdpKey string) (*[]model.User, error) GetUser(ctx context.Context, userID uint32, sub, userIdpKey string) (*model.User, error) GetUserBySub(ctx context.Context, sub string) (*model.User, error) CreateUser(ctx context.Context, u *model.User) (*model.User, error) PutUser(ctx context.Context, u *model.User) (*model.User, error) GetActiveUserCount(ctx context.Context) (*int, error) GetUserByUserIdpKey(ctx context.Context, userIdpKey string) (*model.User, error) // Role ListRole(ctx context.Context, projectID uint32, name string, userID uint32, accessTokenID uint32) (*[]model.Role, error) GetRole(ctx context.Context, projectID, roleID uint32) (*model.Role, error) GetRoleByName(ctx context.Context, projectID uint32, name string) (*model.Role, error) PutRole(ctx context.Context, r *model.Role) (*model.Role, error) DeleteRole(ctx context.Context, projectID, roleID uint32) error AttachRole(ctx context.Context, projectID, roleID, userID uint32) (*model.UserRole, error) AttachAllAdminRole(ctx context.Context, userID uint32) error DetachRole(ctx context.Context, projectID, roleID, userID uint32) error // Policy GetUserPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error) GetTokenPolicy(ctx context.Context, accessTokenID uint32) (*[]model.Policy, error) GetAdminPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error) ListPolicy(ctx context.Context, projectID uint32, name string, roleID uint32) (*[]model.Policy, error) GetPolicy(ctx context.Context, projectID, policyID uint32) (*model.Policy, error) GetPolicyByName(ctx context.Context, projectID uint32, name string) (*model.Policy, error) PutPolicy(ctx context.Context, p *model.Policy) (*model.Policy, error) DeletePolicy(ctx context.Context, projectID, policyID uint32) error AttachPolicy(ctx context.Context, projectID, roleID, policyID uint32) (*model.RolePolicy, error) DetachPolicy(ctx context.Context, projectID, roleID, policyID uint32) error // AccessToken ListAccessToken(ctx context.Context, projectID uint32, name string, accessTokenID uint32) (*[]model.AccessToken, error) GetAccessTokenByUniqueKey(ctx context.Context, projectID uint32, name string) (*model.AccessToken, error) GetActiveAccessTokenHash(ctx context.Context, projectID, accessTokenID uint32, tokenHash string) (*model.AccessToken, error) PutAccessToken(ctx context.Context, r *model.AccessToken) (*model.AccessToken, error) DeleteAccessToken(ctx context.Context, projectID, accessTokenID uint32) error AttachAccessTokenRole(ctx context.Context, projectID, roleID, accessTokenID uint32) (*model.AccessTokenRole, error) DetachAccessTokenRole(ctx context.Context, projectID, roleID, accessTokenID uint32) error ExistsAccessTokenMaintainer(ctx context.Context, projectID, accessTokenID uint32) (bool, error) ListExpiredAccessToken(ctx context.Context) (*[]model.AccessToken, error) // UserReserved ListUserReserved(ctx context.Context, projectID uint32, userIdpKey string) (*[]model.UserReserved, error) ListUserReservedWithProjectID(ctx context.Context, userIdpKey string) (*[]UserReservedWithProjectID, error) PutUserReserved(ctx context.Context, u *model.UserReserved) (*model.UserReserved, error) DeleteUserReserved(ctx context.Context, projectID, reservedID uint32) error }
type ProjectRepository ¶
type ProjectRepository interface { ListProject(ctx context.Context, userID, projectID uint32, name string) (*[]ProjectWithTag, error) CreateProject(ctx context.Context, name string) (*model.Project, error) UpdateProject(ctx context.Context, projectID uint32, name string) (*model.Project, error) DeleteProject(ctx context.Context, projectID uint32) error TagProject(ctx context.Context, projectID uint32, tag, color string) (*model.ProjectTag, error) UntagProject(ctx context.Context, projectID uint32, tag string) error CleanWithNoProject(context.Context) error }
type ProjectWithTag ¶
type ReportRepository ¶
type ReportRepository interface { // Report GetReportFinding(context.Context, uint32, []string, string, string, float32) (*[]model.ReportFinding, error) GetReportFindingAll(context.Context, []string, string, string, float32) (*[]model.ReportFinding, error) CollectReportFinding(ctx context.Context) error PurgeReportFinding(ctx context.Context) error }
type UserReservedWithProjectID ¶ added in v0.5.0
For ListUserReservedWithProjectID
Click to show internal directories.
Click to hide internal directories.