Documentation ¶
Index ¶
- Constants
- func GetFunctionName() string
- func ReadFileBytes(path string) (content []byte, err error)
- type FileConfig
- type Session
- func (s *Session) GetAuthorizer() error
- func (s *Session) GetCredential() error
- func (s *Session) GetFrontDoorPoliciesClient(subID string) (err error)
- func (s *Session) GetFrontDoorsClient(subID string) (c armfrontdoor.FrontDoorsClient, err error)
- func (s *Session) GetManagedRuleSetsClient(subID string) (err error)
- func (s *Session) GetResourcesClient(subID string) (err error)
- func (s *Session) InitialiseCache()
- func (s *Session) InitialiseFilePaths() error
Constants ¶
View Source
const ( WorkingRelPath = ".azwaf" BackupsRelPath = "backups" CacheRelPath = "cache" CacheFile = "cache.db" )
Variables ¶
This section is empty.
Functions ¶
func GetFunctionName ¶
func GetFunctionName() string
func ReadFileBytes ¶
Types ¶
type FileConfig ¶
func LoadFileConfig ¶
func LoadFileConfig(path string) (config FileConfig, err error)
type Session ¶
type Session struct { Authorizer *autorest.Authorizer Credential azcore.TokenCredential FrontDoorPoliciesClients map[string]*armfrontdoor.PoliciesClient FrontDoorsClients map[string]*armfrontdoor.FrontDoorsClient FrontDoorsManagedRuleSetsClients map[string]*armfrontdoor.ManagedRuleSetsClient FrontDoorsManagedRuleSetDefinitions []*armfrontdoor.ManagedRuleSetDefinition ResourcesClients map[string]*resources.Client WorkingDir string BackupsDir string CacheDir string CachePath string Cache *buntdb.DB AppVersion string }
func (*Session) GetAuthorizer ¶
func (*Session) GetCredential ¶
func (*Session) GetFrontDoorPoliciesClient ¶
func (*Session) GetFrontDoorsClient ¶
func (s *Session) GetFrontDoorsClient(subID string) (c armfrontdoor.FrontDoorsClient, err error)
GetFrontDoorsClient creates a front doors client for the given Subscription and stores it in the provided session. If an Authorizer instance is missing, it will make a call to create it and then store in the session also.
func (*Session) GetManagedRuleSetsClient ¶
func (*Session) GetResourcesClient ¶
GetResourcesClient creates a new resources client instance and stores it in the provided session. If an authorizer instance is missing, it will make a call to create it and then store in the session also.
func (*Session) InitialiseCache ¶
func (s *Session) InitialiseCache()
func (*Session) InitialiseFilePaths ¶
Click to show internal directories.
Click to hide internal directories.