Documentation
¶
Index ¶
- type Author
- type AuthorType
- type GetRepliesResponseBody
- type GetRequestResponseBody
- type GetRequestsResponseBody
- type PSSService
- type Reply
- type Request
- type RequestNotFoundError
- type RequestPriority
- type RequestStatus
- type Service
- func (s *Service) GetRequest(requestID int) (Request, error)
- func (s *Service) GetRequestConversation(requestID int) ([]Reply, error)
- func (s *Service) GetRequests(parameters connection.APIRequestParameters) ([]Request, error)
- func (s *Service) GetRequestsPaginated(parameters connection.APIRequestParameters) ([]Request, error)
- type SupportUser
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) ([]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"` Assignee *SupportUser `json:"assignee"` 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 ¶
GetRequest retrieves a single request by id
func (*Service) GetRequestConversation ¶
GetRequestConversation retrieves the 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
type SupportUser ¶
SupportUser represents a PSS support user