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

serializers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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 Comment added in v1.3.0

type Comment struct {
	Content string `json:"content"`
}

type Commit added in v1.3.0

type Commit struct {
	CommitID string `json:"commitId"`
	Comment  string `json:"comment"`
	URL      string `json:"url"`
}

type ConnectedResponse added in v0.2.0

type ConnectedResponse struct {
	IsConnected 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"`
	ServiceType  string `json:"serviceType"`
	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"`
	ServiceType  string `json:"serviceType"`
	ChannelID    string `json:"channelID"`
	MMUserID     string `json:"mmUserID"`
}

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"`
	IsAdmin          bool   `json:"isAdmin"`
}

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 PullRequest added in v1.3.0

type PullRequest struct {
	PullRequestID int         `json:"pullRequestId"`
	Reviewers     []Reviewers `json:"reviewers"`
	SourceRefName string      `json:"sourceRefName"`
	TargetRefName string      `json:"targetRefName"`
	MergeStatus   string      `json:"mergeStatus"`
	Title         string      `json:"title"`
	Description   string      `json:"description"`
	Repository    Repository  `json:"repository"`
}

type RefUpdates added in v1.3.0

type RefUpdates struct {
	Name string `json:"name"`
}

type Repository added in v1.3.0

type Repository struct {
	Name string `json:"name"`
}

type Resource added in v1.3.0

type Resource struct {
	PullRequestID int          `json:"pullRequestId"`
	Reviewers     []Reviewers  `json:"reviewers"`
	SourceRefName string       `json:"sourceRefName"`
	TargetRefName string       `json:"targetRefName"`
	MergeStatus   string       `json:"mergeStatus"`
	Title         string       `json:"title"`
	Description   string       `json:"description"`
	Repository    Repository   `json:"repository"`
	Comment       Comment      `json:"comment"`
	PullRequest   PullRequest  `json:"pullRequest"`
	Commits       []Commit     `json:"commits"`
	RefUpdates    []RefUpdates `json:"refUpdates"`
}

type Reviewers added in v1.3.0

type Reviewers struct {
	DisplayName string `json:"displayName"`
}

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"`
	ServiceType      string `json:"serviceType"`
	ChannelID        string `json:"channelID"`
	ChannelName      string `json:"channelName"`
	ChannelType      string `json:"channelType"`
	SubscriptionID   string `json:"subscriptionID"`
	CreatedBy        string `json:"createdBy"`
}

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"`
	Message         DetailedMessage `json:"Message"`
	EventType       string          `json:"eventType"`
	Resource        Resource        `json:"resource"`
}

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"`
	ServiceType      string          `json:"serviceType"`
	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 User added in v1.0.0

type User struct {
	MattermostUserID string `json:"mattermostUserID"`
	AccessToken      string `json:"accessToken"`
	RefreshToken     string `json:"refreshToken"`
	ExpiresAt        int64  `json:"expiresAt"`
}

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