mattermosthttpclient

package
v0.0.0-...-f10ad04 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MattermostHttpClient

type MattermostHttpClient struct {
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(client *http.Client, token string, baseUrl string) *MattermostHttpClient

func (*MattermostHttpClient) CreatePost

func (client *MattermostHttpClient) CreatePost(ctx context.Context, post RequestPost) error

type RequestPost

type RequestPost struct {
	ChannelId string                 `json:"channel_id"`
	Message   string                 `json:"message"`
	RootId    string                 `json:"root_id,omitempty"`
	FileIds   []string               `json:"file_ids,omitempty"`
	Props     interface{}            `json:"props,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type ResponsePost

type ResponsePost struct {
	Id            string                 `json:"id,omitempty"`
	CreateAt      int                    `json:"create_at,omitempty"`
	UpdateAt      int                    `json:"update_at,omitempty"`
	DeleteAt      int                    `json:"delete_at,omitempty"`
	EditAt        int                    `json:"edit_at,omitempty"`
	UserId        string                 `json:"user_id,omitempty"`
	ChannelId     string                 `json:"channel_id,omitempty"`
	RootId        string                 `json:"root_id,omitempty"`
	OriginalId    string                 `json:"original_id,omitempty"`
	Message       string                 `json:"message,omitempty"`
	Type          string                 `json:"type,omitempty"`
	Props         map[string]interface{} `json:"props,omitempty"`
	Hashtag       string                 `json:"hashtag,omitempty"`
	PendingPostId string                 `json:"pending_post_id,omitempty"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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