pss

package
v1.0.31 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID   int        `json:"id"`
	Name string     `json:"name"`
	Type AuthorType `json:"type"`
}

Author represents a PSS request author

type AuthorType

type AuthorType string
const (
	AuthorTypeClient  AuthorType = "Client"
	AuthorTypeAuto    AuthorType = "Auto"
	AuthorTypeSupport AuthorType = "Support"
)

func (AuthorType) String

func (s AuthorType) String() string

type GetRepliesResponseBody

type GetRepliesResponseBody struct {
	connection.APIResponseBody

	Data []Reply `json:"data"`
}

GetRepliesResponseBody represents the API response body from the GetReplies resource

type GetRequestResponseBody

type GetRequestResponseBody struct {
	connection.APIResponseBody

	Data Request `json:"data"`
}

GetRequestResponseBody represents the API response body from the GetRequest resource

type GetRequestsResponseBody

type GetRequestsResponseBody struct {
	connection.APIResponseBody

	Data []Request `json:"data"`
}

GetRequestsResponseBody represents the API response body from the GetRequests resource

type PSSService

type PSSService interface {
	GetRequests(parameters connection.APIRequestParameters) ([]Request, error)
	GetRequestsPaginated(parameters connection.APIRequestParameters) ([]Request, error)
	GetRequest(requestID int) (Request, error)
	GetRequestConversation(requestID int, parameters connection.APIRequestParameters) ([]Reply, error)
	GetRequestConversationPaginated(requestID int, parameters connection.APIRequestParameters) ([]Reply, error)
}

PSSService is an interface for managing PSS

type Reply

type Reply struct {
	Author      Author              `json:"author"`
	Description string              `json:"description"`
	CreatedAt   connection.DateTime `json:"created_at"`
}

Reply represents a PSS reply

type Request

type Request struct {
	ID         int                 `json:"id"`
	Author     Author              `json:"author"`
	Type       string              `json:"type"`
	Secure     bool                `json:"secure"`
	Subject    string              `json:"subject"`
	CreatedAt  connection.DateTime `json:"created_at"`
	Priority   RequestPriority     `json:"priority"`
	Archived   bool                `json:"archived"`
	Status     RequestStatus       `json:"status"`
	RequestSMS bool                `json:"request_sms"`
}

Request represents a PSS request

type RequestNotFoundError

type RequestNotFoundError struct {
	ID int
}

RequestNotFoundError indicates a request was not found

func (*RequestNotFoundError) Error

func (e *RequestNotFoundError) Error() string

type RequestPriority

type RequestPriority string
const (
	RequestPriorityNormal   RequestPriority = "Normal"
	RequestPriorityHigh     RequestPriority = "High"
	RequestPriorityCritical RequestPriority = "Critical"
)

func (RequestPriority) String

func (s RequestPriority) String() string

type RequestStatus

type RequestStatus string
const (
	RequestStatusCompleted                RequestStatus = "Completed"
	RequestStatusAwaitingCustomerResponse RequestStatus = "Awaiting Customer Response"
	RequestStatusRepliedAndCompleted      RequestStatus = "Replied and Completed"
	RequestStatusSubmitted                RequestStatus = "Submitted"
)

func (RequestStatus) String

func (s RequestStatus) String() string

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements PSSService for managing PSS certificates via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of PSSService

func (*Service) GetRequest

func (s *Service) GetRequest(requestID int) (Request, error)

GetRequest retrieves a single request by id

func (*Service) GetRequestConversation

func (s *Service) GetRequestConversation(requestID int, parameters connection.APIRequestParameters) ([]Reply, error)

GetRequestConversation retrieves a conversation for a request

func (*Service) GetRequestConversationPaginated added in v1.0.15

func (s *Service) GetRequestConversationPaginated(requestID int, parameters connection.APIRequestParameters) ([]Reply, error)

GetRequestConversationPaginated retrieves a paginated conversation for a request

func (*Service) GetRequests

func (s *Service) GetRequests(parameters connection.APIRequestParameters) ([]Request, error)

GetRequests retrieves a list of requests

func (*Service) GetRequestsPaginated

func (s *Service) GetRequestsPaginated(parameters connection.APIRequestParameters) ([]Request, error)

GetRequestsPaginated retrieves a paginated list of requests

Jump to

Keyboard shortcuts

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