serializers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 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 Error

type Error struct {
	Code    int
	Message string
}

Error struct to store error codes and error message.

type GenerateTokenPayload

type GenerateTokenPayload struct {
	ClientAssertionType string `json:"client_assertion_type"`
	ClientAssertion     string `json:"client_assertion"`
	GrantType           string `json:"grant_type"`
	Assertion           string `json:"assertion"`
	RedirectURI         string `json:"redirect_uri"`
}

type GetTaskData

type GetTaskData struct {
	Organization string
	Project      string
	TaskID       string
}

type Href

type Href struct {
	Href string `json:"href"`
}
type Link struct {
	HTML Href `json:"html"`
}

type LinkRequestPayload

type LinkRequestPayload struct {
	Organization string `json:"organization"`
	Project      string `json:"project"`
}

func (*LinkRequestPayload) IsLinkPayloadValid

func (t *LinkRequestPayload) IsLinkPayloadValid() string

IsLinkPayloadValid function to validate request payload.

type OAuthErrorResponse

type OAuthErrorResponse struct {
	ErrorMessage     string `json:"Error"`
	ErrorDescription string `json:"ErrorDescription"`
}

type OAuthSuccessResponse

type OAuthSuccessResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    string `json:"expires_in"`
}

type Project

type Project struct {
	ID   string      `json:"id"`
	Name string      `json:"name"`
	Link ProjectLink `json:"_links"`
}

type ProjectDetails

type ProjectDetails struct {
	MattermostUserID string `json:"mattermostUserID"`
	ProjectID        string `json:"projectID"`
	ProjectName      string `json:"projectName"`
	OrganizationName string `json:"organizationName"`
}
type ProjectLink struct {
	Web Href `json:"web"`
}

type SuccessResponse

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

type TaskCreateBodyPayload

type TaskCreateBodyPayload struct {
	Operation string `json:"op"`
	Path      string `json:"path"`
	From      string `json:"from"`
	Value     string `json:"value"`
}

type TaskCreateFieldValue

type TaskCreateFieldValue struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

type TaskCreateRequestPayload

type TaskCreateRequestPayload struct {
	Organization string               `json:"organization"`
	Project      string               `json:"project"`
	Type         string               `json:"type"`
	Fields       TaskCreateFieldValue `json:"fields"`
}

func (*TaskCreateRequestPayload) IsValid

func (t *TaskCreateRequestPayload) IsValid() error

IsValid function to validate request payload.

type TaskFieldValue

type TaskFieldValue struct {
	Title       string          `json:"System.Title"`
	Project     string          `json:"System.TeamProject"`
	Type        string          `json:"System.WorkItemType"`
	State       string          `json:"System.State"`
	Reason      string          `json:"System.Reason"`
	AssignedTo  TaskUserDetails `json:"System.AssignedTo"`
	CreatedAt   time.Time       `json:"System.CreatedDate"`
	CreatedBy   TaskUserDetails `json:"System.CreatedBy"`
	UpdatedAt   time.Time       `json:"System.ChangedDate"`
	UpdatedBy   TaskUserDetails `json:"System.ChangedBy"`
	Description string          `json:"System.Description"`
}

type TaskUserDetails

type TaskUserDetails struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
	UniqueName  string `json:"uniqueName"`
}

type TaskValue

type TaskValue struct {
	ID     int            `json:"id"`
	Fields TaskFieldValue `json:"fields"`
	Link   Link           `json:"_links"`
}

Jump to

Keyboard shortcuts

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