cmp

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ProductionEndpoint = "https://apigw-86xkfxhy.appsdigit.inet.co.th"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatResponse

type ChatResponse struct {
	To           string   `json:"to"`
	CustomNotify string   `json:"custom_notification"`
	Elements     Elements `json:"elements"`
}

type Choice

type Choice struct {
	Label        string `json:"label"`
	Type         string `json:"type"`
	Url          string `json:"url"`
	Size         string `json:"size"`
	Sign         string `json:"sign"`
	OneChatToken bool   `json:"onechat_token"`
}

type Client

type Client struct {
	ApiEndpoint string
}

func New

func New() Client

func (*Client) GetConsentStatus

func (c *Client) GetConsentStatus(form ConsentRequestForm) (StatusResult, error)

type ConsentRequestForm

type ConsentRequestForm struct {
	TaxId         string `json:"tax_id"`
	ShareToken    string `json:"shared_token"`
	ServiceId     string `json:"service_id"`
	ConsentFormId string `json:"consent_form_id"`
}

type Elements

type Elements struct {
	Image   string `json:"image"`
	Title   string `json:"title"`
	Detail  string `json:"detail"`
	Choices Choice `json:"choice"`
}

type StatusInfo

type StatusInfo struct {
	Status   string       `json:"status"`
	Response ChatResponse `json:"response"`
}

type StatusResult

type StatusResult struct {
	Result       string     `json:"result"`
	Data         StatusInfo `json:"data"`
	ErrorMessage string     `json:"errorMessage"`
	Code         int        `json:"code"`
}

Jump to

Keyboard shortcuts

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