Documentation
¶
Index ¶
- Constants
- func HTTPRespToString(resp *http.Response) (string, error)
- func HttpGetter(httpClient *http.Client, fullURL string) (string, error)
- func JSONDecoder(origin string) *json.Decoder
- type GitRegoStore
- func (gs *GitRegoStore) GetOPAControl(c string) (*opapolicy.Control, error)
- func (gs *GitRegoStore) GetOPAControlByID(controlID string) (*opapolicy.Control, error)
- func (gs *GitRegoStore) GetOPAControlByName(controlName string) (*opapolicy.Control, error)
- func (gs *GitRegoStore) GetOPAControls() ([]opapolicy.Control, error)
- func (gs *GitRegoStore) GetOPAControlsIDsList() ([]string, error)
- func (gs *GitRegoStore) GetOPAControlsNamesList() ([]string, error)
- func (gs *GitRegoStore) GetOPAFrameworkByName(frameworkName string) (*opapolicy.Framework, error)
- func (gs *GitRegoStore) GetOPAFrameworks() ([]opapolicy.Framework, error)
- func (gs *GitRegoStore) GetOPAFrameworksNamesList() ([]string, error)
- func (gs *GitRegoStore) GetOPAPolicies() ([]opapolicy.PolicyRule, error)
- func (gs *GitRegoStore) GetOPAPoliciesNamesList() ([]string, error)
- func (gs *GitRegoStore) GetOPAPolicyByName(ruleName string) (*opapolicy.PolicyRule, error)
- func (gs *GitRegoStore) GetOpaFrameworkListByControlID(controlID string) []string
- func (gs *GitRegoStore) GetOpaFrameworkListByControlName(controlName string) []string
- type InnerTree
- type Tree
Constants ¶
const (
ControlRuleRelationsFileName = "ControlID_RuleName"
)
Variables ¶
This section is empty.
Functions ¶
func HTTPRespToString ¶
HTTPRespToString parses the body as string and checks the HTTP status code, it closes the body reader at the end
func JSONDecoder ¶
JSONDecoder returns JSON decoder for given string
Types ¶
type GitRegoStore ¶
type GitRegoStore struct { Frameworks []opapolicy.Framework Controls []opapolicy.Control Rules []opapolicy.PolicyRule FrameworkControlRelations dataframe.DataFrame ControlRuleRelations dataframe.DataFrame URL string BaseUrl string Owner string Repository string Path string Tag string Branch string FrequencyPullFromGitMinutes int CurGitVersion string Watch bool // contains filtered or unexported fields }
func InitDefaultGitRegoStore ¶
func InitDefaultGitRegoStore(frequency int) *GitRegoStore
func InitGitRegoStore ¶
func InitGitRegoStore(baseUrl string, owner string, repository string, path string, tag string, branch string, frequency int) *GitRegoStore
if frequency < 0 will pull only once
func (*GitRegoStore) GetOPAControl ¶
func (gs *GitRegoStore) GetOPAControl(c string) (*opapolicy.Control, error)
GetOPAControl returns specific control by the name or ID
func (*GitRegoStore) GetOPAControlByID ¶
func (gs *GitRegoStore) GetOPAControlByID(controlID string) (*opapolicy.Control, error)
GetOPAControlByID returns specific control by the ID
func (*GitRegoStore) GetOPAControlByName ¶
func (gs *GitRegoStore) GetOPAControlByName(controlName string) (*opapolicy.Control, error)
GetOPAControlByName returns specific control by the name
func (*GitRegoStore) GetOPAControls ¶
func (gs *GitRegoStore) GetOPAControls() ([]opapolicy.Control, error)
GetOPAControls returns all the controls of given customer
func (*GitRegoStore) GetOPAControlsIDsList ¶
func (gs *GitRegoStore) GetOPAControlsIDsList() ([]string, error)
func (*GitRegoStore) GetOPAControlsNamesList ¶
func (gs *GitRegoStore) GetOPAControlsNamesList() ([]string, error)
func (*GitRegoStore) GetOPAFrameworkByName ¶
func (gs *GitRegoStore) GetOPAFrameworkByName(frameworkName string) (*opapolicy.Framework, error)
GetOPAFrameworkByName returns specific framework by the name
func (*GitRegoStore) GetOPAFrameworks ¶
func (gs *GitRegoStore) GetOPAFrameworks() ([]opapolicy.Framework, error)
GetOPAFrameworks returns all the frameworks of given customer
func (*GitRegoStore) GetOPAFrameworksNamesList ¶
func (gs *GitRegoStore) GetOPAFrameworksNamesList() ([]string, error)
func (*GitRegoStore) GetOPAPolicies ¶
func (gs *GitRegoStore) GetOPAPolicies() ([]opapolicy.PolicyRule, error)
GetOPAPolicies returns all the policies of given customer
func (*GitRegoStore) GetOPAPoliciesNamesList ¶
func (gs *GitRegoStore) GetOPAPoliciesNamesList() ([]string, error)
func (*GitRegoStore) GetOPAPolicyByName ¶
func (gs *GitRegoStore) GetOPAPolicyByName(ruleName string) (*opapolicy.PolicyRule, error)
GetOPAPolicyByName returns specific policy by the name
func (*GitRegoStore) GetOpaFrameworkListByControlID ¶
func (gs *GitRegoStore) GetOpaFrameworkListByControlID(controlID string) []string
GetOpaFrameworkListByControlID return a list of fw names this control is in
func (*GitRegoStore) GetOpaFrameworkListByControlName ¶
func (gs *GitRegoStore) GetOpaFrameworkListByControlName(controlName string) []string
GetOpaFrameworkListByControlName return a list of fw names this control is in