domain

package
v0.0.0-...-1cd85f6 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LineEventTypeMessage  = LineEventType("message")
	LineEventTypeFollow   = LineEventType("follow")
	LineEventTypeUnfollow = LineEventType("unfollow")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID                    int
	Name                  string
	ExternalChannelID     string
	ExternalChannelSecret string
	AccessToken           string
	AccessTokenExpiredAt  time.Time
	CreatedAt             time.Time
	UpdatedAt             time.Time
}

type Error

type Error interface {
	Error() string
	// ClientMsg returns messages clients should know
	ClientMsg() string
}

func NewExternalError

func NewExternalError(clientMsg string, statusCode *int, err error) Error

func NewInternalError

func NewInternalError(clientMsg string, err error) Error

func NewParameterError

func NewParameterError(clientMsg string, err error) Error

func NewResourceNotFoundError

func NewResourceNotFoundError(clientMsg string, err error) Error

type ExternalError

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

ExternalError is used when calling external service goes wrong

func (ExternalError) ClientMsg

func (e ExternalError) ClientMsg() string

func (ExternalError) Error

func (e ExternalError) Error() string

func (ExternalError) StatusCode

func (e ExternalError) StatusCode() int

type InternalError

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

InternalError is used when process goes wrong

func (InternalError) ClientMsg

func (e InternalError) ClientMsg() string

func (InternalError) Error

func (e InternalError) Error() string

type LineEvent

type LineEvent struct {
	ExternalMemberID string
	EventType        LineEventType
	ReplyToken       string
	EventContent     []byte
}

type LineEventType

type LineEventType string

type LineWebhook

type LineWebhook struct {
	ExternalChannelID string
	Signature         string
	Payload           []byte
}

type ParameterError

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

ParameterError is used when parameters are missing or invalid

func (ParameterError) ClientMsg

func (e ParameterError) ClientMsg() string

func (ParameterError) Error

func (e ParameterError) Error() string

type ResourceNotFoundError

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

ResourceNotFoundError is used when resources cannot be found

func (ResourceNotFoundError) ClientMsg

func (e ResourceNotFoundError) ClientMsg() string

func (ResourceNotFoundError) Error

func (e ResourceNotFoundError) Error() string

Jump to

Keyboard shortcuts

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