rules

package
v62.0.0-...-eaec136 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServiceName - The name of service.
	ServiceName = "Rules"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRuleCommandInput

type AddRuleCommandInput struct {
	Body models.RuleView
}

AddRuleCommandInput - Inputs for AddRuleCommand

type DeleteRuleCommandInput

type DeleteRuleCommandInput struct {
	Id string
}

DeleteRuleCommandInput - Inputs for DeleteRuleCommand

type GetRuleCommandInput

type GetRuleCommandInput struct {
	Id string
}

GetRuleCommandInput - Inputs for GetRuleCommand

type GetRuleDescriptorCommandInput

type GetRuleDescriptorCommandInput struct {
	RuleType string
}

GetRuleDescriptorCommandInput - Inputs for GetRuleDescriptorCommand

type GetRulesCommandInput

type GetRulesCommandInput struct {
	Page          string
	NumberPerPage string
	Filter        string
	Name          string
	SortKey       string
	Order         string
}

GetRulesCommandInput - Inputs for GetRulesCommand

type RulesAPI

type RulesAPI interface {
	GetRulesCommand(input *GetRulesCommandInput) (output *models.RulesView, resp *http.Response, err error)
	AddRuleCommand(input *AddRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)
	GetRuleDescriptorsCommand() (output *models.RuleDescriptorsView, resp *http.Response, err error)
	GetRuleDescriptorCommand(input *GetRuleDescriptorCommandInput) (output *models.RuleDescriptorView, resp *http.Response, err error)
	DeleteRuleCommand(input *DeleteRuleCommandInput) (resp *http.Response, err error)
	GetRuleCommand(input *GetRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)
	UpdateRuleCommand(input *UpdateRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)
}

type RulesService

type RulesService struct {
	*client.Client
}

RulesService provides the API operations for making requests to Rules endpoint.

func New

func New(cfg *config.Config) *RulesService

New createa a new instance of the RulesService client.

Example:

cfg := config.NewConfig().WithUsername("Administrator").WithPassword("2Access").WithEndpoint(paURL)

//Create a RulesService from the configuration
svc := rules.New(cfg)

func (*RulesService) AddRuleCommand

func (s *RulesService) AddRuleCommand(input *AddRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)

AddRuleCommand - Add a Rule RequestType: POST Input: input *AddRuleCommandInput

func (*RulesService) DeleteRuleCommand

func (s *RulesService) DeleteRuleCommand(input *DeleteRuleCommandInput) (resp *http.Response, err error)

DeleteRuleCommand - Delete a Rule RequestType: DELETE Input: input *DeleteRuleCommandInput

func (*RulesService) GetRuleCommand

func (s *RulesService) GetRuleCommand(input *GetRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)

GetRuleCommand - Get a Rule RequestType: GET Input: input *GetRuleCommandInput

func (*RulesService) GetRuleDescriptorCommand

func (s *RulesService) GetRuleDescriptorCommand(input *GetRuleDescriptorCommandInput) (output *models.RuleDescriptorView, resp *http.Response, err error)

GetRuleDescriptorCommand - Get descriptor for a Rule type RequestType: GET Input: input *GetRuleDescriptorCommandInput

func (*RulesService) GetRuleDescriptorsCommand

func (s *RulesService) GetRuleDescriptorsCommand() (output *models.RuleDescriptorsView, resp *http.Response, err error)

GetRuleDescriptorsCommand - Get descriptors for all supported Rule types RequestType: GET Input:

func (*RulesService) GetRulesCommand

func (s *RulesService) GetRulesCommand(input *GetRulesCommandInput) (output *models.RulesView, resp *http.Response, err error)

GetRulesCommand - Get all Rules RequestType: GET Input: input *GetRulesCommandInput

func (*RulesService) UpdateRuleCommand

func (s *RulesService) UpdateRuleCommand(input *UpdateRuleCommandInput) (output *models.RuleView, resp *http.Response, err error)

UpdateRuleCommand - Update a Rule RequestType: PUT Input: input *UpdateRuleCommandInput

type UpdateRuleCommandInput

type UpdateRuleCommandInput struct {
	Body models.RuleView
	Id   string
}

UpdateRuleCommandInput - Inputs for UpdateRuleCommand

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL