redirects

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRedirectCommandInput

type AddRedirectCommandInput struct {
	Body models.RedirectView
}

AddRedirectCommandInput - Inputs for AddRedirectCommand

type DeleteRedirectCommandInput

type DeleteRedirectCommandInput struct {
	Id string
}

DeleteRedirectCommandInput - Inputs for DeleteRedirectCommand

type GetRedirectCommandInput

type GetRedirectCommandInput struct {
	Id string
}

GetRedirectCommandInput - Inputs for GetRedirectCommand

type GetRedirectsCommandInput

type GetRedirectsCommandInput struct {
	Page          string
	NumberPerPage string
	Filter        string
	Source        string
	Target        string
	SortKey       string
	Order         string
}

GetRedirectsCommandInput - Inputs for GetRedirectsCommand

type RedirectsAPI

type RedirectsAPI interface {
	GetRedirectsCommand(input *GetRedirectsCommandInput) (output *models.RedirectsView, resp *http.Response, err error)
	AddRedirectCommand(input *AddRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)
	DeleteRedirectCommand(input *DeleteRedirectCommandInput) (resp *http.Response, err error)
	GetRedirectCommand(input *GetRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)
	UpdateRedirectCommand(input *UpdateRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)
}

type RedirectsService

type RedirectsService struct {
	*client.Client
}

RedirectsService provides the API operations for making requests to Redirects endpoint.

func New

func New(cfg *config.Config) *RedirectsService

New createa a new instance of the RedirectsService client.

Example:

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

//Create a RedirectsService from the configuration
svc := redirects.New(cfg)

func (*RedirectsService) AddRedirectCommand

func (s *RedirectsService) AddRedirectCommand(input *AddRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)

AddRedirectCommand - Add a Redirect RequestType: POST Input: input *AddRedirectCommandInput

func (*RedirectsService) DeleteRedirectCommand

func (s *RedirectsService) DeleteRedirectCommand(input *DeleteRedirectCommandInput) (resp *http.Response, err error)

DeleteRedirectCommand - Delete a Redirect RequestType: DELETE Input: input *DeleteRedirectCommandInput

func (*RedirectsService) GetRedirectCommand

func (s *RedirectsService) GetRedirectCommand(input *GetRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)

GetRedirectCommand - Get a Redirect RequestType: GET Input: input *GetRedirectCommandInput

func (*RedirectsService) GetRedirectsCommand

func (s *RedirectsService) GetRedirectsCommand(input *GetRedirectsCommandInput) (output *models.RedirectsView, resp *http.Response, err error)

GetRedirectsCommand - Get all Redirects RequestType: GET Input: input *GetRedirectsCommandInput

func (*RedirectsService) UpdateRedirectCommand

func (s *RedirectsService) UpdateRedirectCommand(input *UpdateRedirectCommandInput) (output *models.RedirectView, resp *http.Response, err error)

UpdateRedirectCommand - Update a Redirect RequestType: PUT Input: input *UpdateRedirectCommandInput

type UpdateRedirectCommandInput

type UpdateRedirectCommandInput struct {
	Body models.RedirectView
	Id   string
}

UpdateRedirectCommandInput - Inputs for UpdateRedirectCommand

Jump to

Keyboard shortcuts

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