data

package
Version: v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentResponse

type CommentResponse struct {
	ID         int64  `json:"ID"`
	TicketID   int64  `json:"ticketID"`
	Owner      string `json:"owner"`
	Content    string `json:"content"`
	Metadata   string `json:"metadata,omitempty"`
	CreatedAt  string `json:"createdAt"`
	ModifiedAt string `json:"modifiedAt"`
}

CommentResponse model definition.

func (*CommentResponse) LoadFromComment

func (r *CommentResponse) LoadFromComment(comment *models.Comment)

LoadFromComment populates the fields of current model from provided comment.

type CreateCommentRequest

type CreateCommentRequest struct {
	TicketID int64  `json:"ticketID"`
	Owner    string `json:"owner"`
	Content  string `json:"content"`
	Metadata string `json:"metadata"`
}

CreateCommentRequest model definition.

func (*CreateCommentRequest) AsComment

func (r *CreateCommentRequest) AsComment() *models.Comment

AsComment converts this request model into comment model.

func (*CreateCommentRequest) Validate

func (r *CreateCommentRequest) Validate() *errors.Type

Validate validates the request.

type CreateTicketRequest

type CreateTicketRequest struct {
	Issuer          string                       `json:"issuer"`
	Owner           string                       `json:"owner"`
	Subject         string                       `json:"subject"`
	Content         string                       `json:"content"`
	Metadata        string                       `json:"metadata"`
	ImportanceLevel models.TicketImportanceLevel `json:"importanceLevel"`
}

CreateTicketRequest model definition.

func (*CreateTicketRequest) AsTicket

func (r *CreateTicketRequest) AsTicket() *models.Ticket

AsTicket converts this request model into ticket model.

func (*CreateTicketRequest) Validate

func (r *CreateTicketRequest) Validate() *errors.Type

Validate validates the request.

type EchoRequest added in v1.0.1

type EchoRequest struct {
	Message string `json:"message"`
}

EchoRequest model definition.

type FilterTicketsRequest

type FilterTicketsRequest struct {
	Issuer          string                       `json:"issuer"`
	Owner           string                       `json:"owner"`
	ImportanceLevel models.TicketImportanceLevel `json:"importanceLevel"`
	Status          models.TicketStatus          `json:"status"`
	FromDate        string                       `json:"fromDate"`
	ToDate          string                       `json:"toDate"`
	PageNumber      int                          `json:"pageNumber"`
	PageSize        int                          `json:"pageSize"`
}

FilterTicketsRequest model definition.

func (*FilterTicketsRequest) Validate

func (r *FilterTicketsRequest) Validate() *errors.Type

Validate validates the request.

type FilterTicketsResponse

type FilterTicketsResponse struct {
	Tickets     []*TicketResponse `json:"tickets,omitempty"`
	HasNextPage bool              `json:"hasNextPage"`
}

FilterTicketsResponse model definition.

func (*FilterTicketsResponse) LoadFromTickets

func (r *FilterTicketsResponse) LoadFromTickets(tickets []*models.Ticket, HasNextPage bool)

LoadFromTickets populates the fields of current model from provided tickets.

type ID

type ID struct {
	ID int64 `json:"ID"`
}

ID model definition.

type TicketResponse

type TicketResponse struct {
	ID              int64                        `json:"ID"`
	Issuer          string                       `json:"issuer"`
	Owner           string                       `json:"owner"`
	Subject         string                       `json:"subject"`
	Content         string                       `json:"content"`
	Metadata        string                       `json:"metadata,omitempty"`
	ImportanceLevel models.TicketImportanceLevel `json:"importanceLevel"`
	Status          models.TicketStatus          `json:"status"`
	Comments        []*CommentResponse           `json:"comments,omitempty"`
	CreatedAt       string                       `json:"createdAt"`
	ModifiedAt      string                       `json:"modifiedAt"`
}

TicketResponse model definition.

func (*TicketResponse) LoadFromTicket

func (r *TicketResponse) LoadFromTicket(ticket *models.Ticket)

LoadFromTicket populates the fields of current model from provided ticket.

type UpdateCommentRequest

type UpdateCommentRequest struct {
	ID       int64  `json:"ID"`
	Metadata string `json:"metadata"`
}

UpdateCommentRequest model definition.

func (*UpdateCommentRequest) AsComment

func (r *UpdateCommentRequest) AsComment() *models.Comment

AsComment converts this request model into comment model.

func (*UpdateCommentRequest) Validate

func (r *UpdateCommentRequest) Validate() *errors.Type

Validate validates the request.

type UpdateTicketRequest

type UpdateTicketRequest struct {
	ID              int64                        `json:"ID"`
	Subject         string                       `json:"subject"`
	Metadata        string                       `json:"metadata"`
	ImportanceLevel models.TicketImportanceLevel `json:"importanceLevel"`
	Status          models.TicketStatus          `json:"status"`
}

UpdateTicketRequest model definition.

func (*UpdateTicketRequest) AsTicket

func (r *UpdateTicketRequest) AsTicket() *models.Ticket

AsTicket converts this request model into ticket model.

func (*UpdateTicketRequest) Validate

func (r *UpdateTicketRequest) Validate() *errors.Type

Validate validates the request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL