Help us shape the future of Go! Take the 2026 Go Developer Survey

serializers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectedResponse added in v0.2.0

type ConnectedResponse struct {
	Connected bool `json:"connected"`
}

type ConsumerInputs added in v0.2.0

type ConsumerInputs struct {
	URL string `json:"url"`
}

type CreateSubscriptionBodyPayload added in v0.2.0

type CreateSubscriptionBodyPayload struct {
	PublisherID      string          `json:"publisherId"`
	EventType        string          `json:"eventType"`
	ConsumerID       string          `json:"consumerId"`
	ConsumerActionID string          `json:"consumerActionId"`
	PublisherInputs  PublisherInputs `json:"publisherInputs"`
	ConsumerInputs   ConsumerInputs  `json:"consumerInputs"`
}

type CreateSubscriptionRequestPayload added in v0.2.0

type CreateSubscriptionRequestPayload struct {
	Organization string `json:"organization"`
	Project      string `json:"project"`
	EventType    string `json:"eventType"`
	ChannelID    string `json:"channelID"`
}

func CreateSubscriptionRequestPayloadFromJSON added in v0.2.0

func CreateSubscriptionRequestPayloadFromJSON(data io.Reader) (*CreateSubscriptionRequestPayload, error)

func (*CreateSubscriptionRequestPayload) IsSubscriptionRequestPayloadValid added in v0.2.0

func (t *CreateSubscriptionRequestPayload) IsSubscriptionRequestPayloadValid() error

type CreateTaskBodyPayload added in v0.2.0

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

type CreateTaskFieldValue added in v0.2.0

type CreateTaskFieldValue struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	AreaPath    string `json:"areaPath"`
}

type CreateTaskRequestPayload added in v0.2.0

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

func CreateTaskRequestPayloadFromJSON added in v0.2.0

func CreateTaskRequestPayloadFromJSON(data io.Reader) (*CreateTaskRequestPayload, error)

func (*CreateTaskRequestPayload) IsValid added in v0.2.0

func (t *CreateTaskRequestPayload) IsValid() error

IsValid function to validate request payload.

type DeleteSubscriptionRequestPayload added in v0.2.0

type DeleteSubscriptionRequestPayload struct {
	Organization string `json:"organization"`
	Project      string `json:"project"`
	EventType    string `json:"eventType"`
	ChannelID    string `json:"channelID"`
}

func DeleteSubscriptionRequestPayloadFromJSON added in v0.2.0

func DeleteSubscriptionRequestPayloadFromJSON(data io.Reader) (*DeleteSubscriptionRequestPayload, error)

func (*DeleteSubscriptionRequestPayload) IsSubscriptionRequestPayloadValid added in v0.2.0

func (t *DeleteSubscriptionRequestPayload) IsSubscriptionRequestPayloadValid() error

type DetailedMessage added in v0.2.0

type DetailedMessage struct {
	Markdown string `json:"markdown"`
}

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 LinkPayloadFromJSON added in v0.2.1

func LinkPayloadFromJSON(data io.Reader) (*LinkRequestPayload, error)

func (*LinkRequestPayload) IsLinkPayloadValid

func (t *LinkRequestPayload) IsLinkPayloadValid() error

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"`
}

func ProjectPayloadFromJSON added in v0.2.1

func ProjectPayloadFromJSON(data io.Reader) (*ProjectDetails, error)

func (*ProjectDetails) IsValid added in v0.2.1

func (t *ProjectDetails) IsValid() error
type ProjectLink struct {
	Web Href `json:"web"`
}

type PublisherInputs added in v0.2.0

type PublisherInputs struct {
	ProjectID string `json:"projectId"`
}

type SubscriptionDetails added in v0.2.0

type SubscriptionDetails struct {
	MattermostUserID string `json:"mattermostUserID"`
	ProjectName      string `json:"projectName"`
	ProjectID        string `json:"projectID"`
	OrganizationName string `json:"organizationName"`
	EventType        string `json:"eventType"`
	ChannelID        string `json:"channelID"`
	ChannelName      string `json:"channelName"`
	SubscriptionID   string `json:"subscriptionID"`
}

type SubscriptionList added in v0.2.0

type SubscriptionList struct {
	Count             int                 `json:"count"`
	SubscriptionValue []SubscriptionValue `json:"value"`
}

type SubscriptionNotification added in v0.2.0

type SubscriptionNotification struct {
	DetailedMessage DetailedMessage `json:"detailedMessage"`
}

func SubscriptionNotificationFromJSON added in v0.2.0

func SubscriptionNotificationFromJSON(data io.Reader) (*SubscriptionNotification, error)

type SubscriptionValue added in v0.2.0

type SubscriptionValue struct {
	ID               string          `json:"id"`
	URL              string          `json:"url"`
	EventType        string          `json:"eventType"`
	ConsumerID       string          `json:"consumerId"`
	ConsumerActionID string          `json:"consumerActionId"`
	CreatedBy        UserID          `json:"createdBy"`
	ModifiedBy       UserID          `json:"modifiedBy"`
	PublisherInputs  PublisherInputs `json:"publisherInputs"`
	ConsumerInputs   ConsumerInputs  `json:"consumerInputs"`
}

type SuccessResponse

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

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"`
}

type UserID added in v0.2.0

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

Jump to

Keyboard shortcuts

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