lark

package module
v2.0.11 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppTicketIsEmpty = errors.New("app ticket is empty")
)

Functions

func BoolPtr

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to the bool value passed in.

func BoolValue

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func DownloadFile

func DownloadFile(ctx context.Context, url string) ([]byte, error)

DownloadFile returns the url of resource

func FileNameByHeader

func FileNameByHeader(header http.Header) string

func Float32Ptr

func Float32Ptr(v float32) *float32

Float32Ptr returns a pointer to the float32 value passed in.

func Float32Value

func Float32Value(v *float32) float32

Float32Value returns the value of the float32 pointer passed in or 0 if the pointer is nil.

func Float64Ptr

func Float64Ptr(v float64) *float64

Float64Ptr returns a pointer to the float64 value passed in.

func Float64Value

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func Int16Ptr

func Int16Ptr(v int16) *int16

Int16Ptr returns a pointer to the int16 value passed in.

func Int16Value

func Int16Value(v *int16) int16

Int16Value returns the value of the int16 pointer passed in or 0 if the pointer is nil.

func Int32Ptr

func Int32Ptr(v int32) *int32

Int32Ptr returns a pointer to the int32 value passed in.

func Int32Value

func Int32Value(v *int32) int32

Int32Value returns the value of the int32 pointer passed in or 0 if the pointer is nil.

func Int64Ptr

func Int64Ptr(v int64) *int64

Int64Ptr returns a pointer to the int64 value passed in.

func Int64Value

func Int64Value(v *int64) int64

Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func Int8Ptr

func Int8Ptr(v int8) *int8

Int8Ptr returns a pointer to the int8 value passed in.

func Int8Value

func Int8Value(v *int8) int8

Int8Value returns the value of the int8 pointer passed in or 0 if the pointer is nil.

func IntPtr

func IntPtr(v int) *int

IntPtr returns a pointer to the int value passed in.

func IntValue

func IntValue(v *int) int

IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.

func NewDefaultLogger

func NewDefaultLogger() logger

func Prettify

func Prettify(i interface{}) string

Prettify returns the string representation of a value.

func StringPtr

func StringPtr(v string) *string

StringPtr returns a pointer to the string value passed in.

func StringValue

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

func TimePtr

func TimePtr(v time.Time) *time.Time

TimePtr returns a pointer to the time.Time value passed in.

func TimeValue

func TimeValue(v *time.Time) time.Time

TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.

Types

type AccessTokenType

type AccessTokenType string
const (
	AccessTokenTypeApp    AccessTokenType = "app_access_token"
	AccessTokenTypeTenant AccessTokenType = "tenant_access_token"
	AccessTokenTypeUser   AccessTokenType = "user_access_token"
)

type App

type App struct {
	Webhook *webhook
	// contains filtered or unexported fields
}

func NewApp

func NewApp(domain Domain, appID, appSecret string, options ...AppOptionFunc) *App

func (*App) SendRequest

func (app *App) SendRequest(ctx context.Context, httpMethod string, httpPath string,
	accessTokenType AccessTokenType, input interface{}, options ...RequestOptionFunc) (*RawResponse, error)

func (*App) SendRequestWithAccessTokenTypes

func (app *App) SendRequestWithAccessTokenTypes(ctx context.Context, httpMethod string, httpPath string,
	accessTokenTypes []AccessTokenType, input interface{}, options ...RequestOptionFunc) (*RawResponse, error)

type AppOptionFunc

type AppOptionFunc func(*App)

func WithAppEventVerify

func WithAppEventVerify(verificationToken, encryptKey string) AppOptionFunc

func WithAppHelpdeskCredential

func WithAppHelpdeskCredential(helpdeskID, helpdeskToken string) AppOptionFunc

func WithAppType

func WithAppType(appType AppType) AppOptionFunc

func WithLogger

func WithLogger(logger logger, level LogLevel) AppOptionFunc

func WithStore

func WithStore(store store) AppOptionFunc

type AppType

type AppType string
const (
	AppTypeCustom      AppType = "Custom App"
	AppTypeMarketplace AppType = "Marketplace App"
)

type CardAction

type CardAction struct {
	OpenID        string `json:"open_id"`
	UserID        string `json:"user_id"`
	OpenMessageID string `json:"open_message_id"`
	TenantKey     string `json:"tenant_key"`
	Token         string `json:"token"`
	Timezone      string `json:"timezone"`

	Action *struct {
		Value    map[string]interface{} `json:"value"`
		Tag      string                 `json:"tag"`
		Option   string                 `json:"option"`
		Timezone string                 `json:"timezone"`
	} `json:"action"`
}

type CodeError

type CodeError struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Err  *struct {
		Details              []*CodeErrorDetail              `json:"details,omitempty"`
		PermissionViolations []*CodeErrorPermissionViolation `json:"permission_violations,omitempty"`
		FieldViolations      []*CodeErrorFieldViolation      `json:"field_violations,omitempty"`
	} `json:"error"`
}

func (CodeError) Error

func (ce CodeError) Error() string

func (CodeError) String

func (ce CodeError) String() string

type CodeErrorDetail

type CodeErrorDetail struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type CodeErrorFieldViolation

type CodeErrorFieldViolation struct {
	Field       string `json:"field,omitempty"`
	Value       string `json:"value,omitempty"`
	Description string `json:"description,omitempty"`
}

type CodeErrorPermissionViolation

type CodeErrorPermissionViolation struct {
	Type        string `json:"type,omitempty"`
	Subject     string `json:"subject,omitempty"`
	Description string `json:"description,omitempty"`
}

type CustomerBot

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

func NewCustomerBot

func NewCustomerBot(webhook string, secret string) *CustomerBot

func (*CustomerBot) SendMessage

func (c *CustomerBot) SendMessage(ctx context.Context, msgType string, content interface{}) (*CustomerBotSendMessageResp, error)

type CustomerBotSendMessageResp

type CustomerBotSendMessageResp struct {
	*RawResponse `json:"-"`
	CodeError
}

type DecryptErr

type DecryptErr struct {
	Message string
}

func (DecryptErr) Error

func (e DecryptErr) Error() string

type Domain

type Domain string
const (
	DomainFeiShu    Domain = "https://open.feishu.cn"
	DomainLarkSuite Domain = "https://open.larksuite.com"
)

type EventBase

type EventBase struct {
	Ts    string `json:"ts"`
	UUID  string `json:"uuid"`
	Token string `json:"token"`
	Type  string `json:"type"`
}

type EventHeader

type EventHeader struct {
	EventID    string `json:"event_id"`
	EventType  string `json:"event_type"`
	AppID      string `json:"app_id"`
	TenantKey  string `json:"tenant_key"`
	CreateTime string `json:"create_time"`
	Token      string `json:"token"`
}

type EventV2Base

type EventV2Base struct {
	Schema string       `json:"schema"`
	Header *EventHeader `json:"header"`
}

type Formdata

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

func NewFormdata

func NewFormdata() *Formdata

func (*Formdata) AddField

func (fd *Formdata) AddField(field string, val interface{}) *Formdata

func (*Formdata) AddFile

func (fd *Formdata) AddFile(field string, r io.Reader) *Formdata

type LogLevel

type LogLevel int
const (
	LogLevelDebug LogLevel = 1
	LogLevelInfo  LogLevel = 2
	LogLevelWarn  LogLevel = 3
	LogLevelError LogLevel = 4
)

type MessageAudio

type MessageAudio struct {
	FileKey string `json:"file_key,omitempty"`
}

func (*MessageAudio) JSON

func (m *MessageAudio) JSON() (string, error)

type MessageCard

type MessageCard struct {
	Config       *MessageCardConfig       `json:"config,omitempty"`
	Header       *MessageCardHeader       `json:"header,omitempty"`
	Elements     []MessageCardElement     `json:"elements,omitempty"`
	I18nElements *MessageCardI18nElements `json:"i18n_elements,omitempty"`
	CardLink     *MessageCardURL          `json:"card_link,omitempty"`
}

func (*MessageCard) JSON

func (m *MessageCard) JSON() (string, error)

type MessageCardAction

type MessageCardAction struct {
	Actions []MessageCardActionElement `json:"actions,omitempty"`
	Layout  *MessageCardActionLayout   `json:"layout,omitempty"`
}

func (*MessageCardAction) MarshalJSON

func (m *MessageCardAction) MarshalJSON() ([]byte, error)

func (*MessageCardAction) Tag

func (m *MessageCardAction) Tag() string

type MessageCardActionConfirm

type MessageCardActionConfirm struct {
	Title *MessageCardPlainText `json:"title,omitempty"`
	Text  *MessageCardPlainText `json:"text,omitempty"`
}

type MessageCardActionElement

type MessageCardActionElement interface {
	MessageCardElement
	IsAction()
}

type MessageCardActionLayout

type MessageCardActionLayout string
const (
	MessageCardActionLayoutBisected   MessageCardActionLayout = "bisected"
	MessageCardActionLayoutTrisection MessageCardActionLayout = "trisection"
	MessageCardActionLayoutFlow       MessageCardActionLayout = "flow"
)

func (MessageCardActionLayout) Ptr

type MessageCardButtonType

type MessageCardButtonType string
const (
	MessageCardButtonTypeDefault MessageCardButtonType = "default"
	MessageCardButtonTypePrimary MessageCardButtonType = "primary"
	MessageCardButtonTypeDanger  MessageCardButtonType = "danger"
)

func (MessageCardButtonType) Ptr

type MessageCardConfig

type MessageCardConfig struct {
	EnableForward  *bool `json:"enable_forward,omitempty"`
	UpdateMulti    *bool `json:"update_multi,omitempty"`
	WideScreenMode *bool `json:"wide_screen_mode,omitempty"`
}

type MessageCardDiv

type MessageCardDiv struct {
	Text   MessageCardText         `json:"text,omitempty"`
	Fields []*MessageCardField     `json:"fields,omitempty"`
	Extra  MessageCardExtraElement `json:"extra,omitempty"`
}

func (*MessageCardDiv) MarshalJSON

func (m *MessageCardDiv) MarshalJSON() ([]byte, error)

func (*MessageCardDiv) Tag

func (m *MessageCardDiv) Tag() string

type MessageCardElement

type MessageCardElement interface {
	Tag() string
	MarshalJSON() ([]byte, error)
}

type MessageCardEmbedButton

type MessageCardEmbedButton struct {
	Text     MessageCardText           `json:"text,omitempty"`
	URL      *string                   `json:"url,omitempty"`
	MultiURL *MessageCardURL           `json:"multi_url,omitempty"`
	Type     *MessageCardButtonType    `json:"type,omitempty"`
	Value    map[string]interface{}    `json:"value,omitempty"`
	Confirm  *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func (*MessageCardEmbedButton) IsAction

func (m *MessageCardEmbedButton) IsAction()

func (*MessageCardEmbedButton) IsExtra

func (m *MessageCardEmbedButton) IsExtra()

func (*MessageCardEmbedButton) MarshalJSON

func (m *MessageCardEmbedButton) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedButton) Tag

func (m *MessageCardEmbedButton) Tag() string

type MessageCardEmbedDatePicker

type MessageCardEmbedDatePicker struct {
	*MessageCardEmbedDatePickerBase
}

func (*MessageCardEmbedDatePicker) MarshalJSON

func (m *MessageCardEmbedDatePicker) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedDatePicker) Tag

type MessageCardEmbedDatePickerBase

type MessageCardEmbedDatePickerBase struct {
	InitialDate     *string                   `json:"initial_date,omitempty"`
	InitialTime     *string                   `json:"initial_time,omitempty"`
	InitialDatetime *string                   `json:"initial_datetime,omitempty"`
	Placeholder     *MessageCardPlainText     `json:"placeholder,omitempty"`
	Value           map[string]interface{}    `json:"value,omitempty"`
	Confirm         *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func (*MessageCardEmbedDatePickerBase) IsAction

func (m *MessageCardEmbedDatePickerBase) IsAction()

func (*MessageCardEmbedDatePickerBase) IsExtra

func (m *MessageCardEmbedDatePickerBase) IsExtra()

type MessageCardEmbedImage

type MessageCardEmbedImage struct {
	Alt     *MessageCardPlainText  `json:"alt,omitempty"`
	ImgKey  string                 `json:"img_key,omitempty"`
	Mode    *MessageCardImageModel `json:"mode,omitempty"`
	Preview *bool                  `json:"preview,omitempty"`
}

func (*MessageCardEmbedImage) IsExtra

func (m *MessageCardEmbedImage) IsExtra()

func (*MessageCardEmbedImage) IsNote

func (m *MessageCardEmbedImage) IsNote()

func (*MessageCardEmbedImage) Tag

func (m *MessageCardEmbedImage) Tag() string

type MessageCardEmbedOverflow

type MessageCardEmbedOverflow struct {
	Options []*MessageCardEmbedSelectOption `json:"options,omitempty"`
	Value   map[string]interface {
	} `json:"value,omitempty"`
	Confirm *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func (*MessageCardEmbedOverflow) IsAction

func (m *MessageCardEmbedOverflow) IsAction()

func (*MessageCardEmbedOverflow) IsExtra

func (m *MessageCardEmbedOverflow) IsExtra()

func (*MessageCardEmbedOverflow) MarshalJSON

func (m *MessageCardEmbedOverflow) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedOverflow) Tag

type MessageCardEmbedPickerDatetime

type MessageCardEmbedPickerDatetime struct {
	*MessageCardEmbedDatePickerBase
}

func (*MessageCardEmbedPickerDatetime) MarshalJSON

func (m *MessageCardEmbedPickerDatetime) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedPickerDatetime) Tag

type MessageCardEmbedPickerTime

type MessageCardEmbedPickerTime struct {
	*MessageCardEmbedDatePickerBase
}

func (*MessageCardEmbedPickerTime) MarshalJSON

func (m *MessageCardEmbedPickerTime) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedPickerTime) Tag

type MessageCardEmbedSelectMenuBase

type MessageCardEmbedSelectMenuBase struct {
	Placeholder   *MessageCardPlainText           `json:"placeholder,omitempty"`
	InitialOption string                          `json:"initial_option,omitempty"`
	Options       []*MessageCardEmbedSelectOption `json:"options,omitempty"`
	Value         map[string]interface {
	} `json:"value,omitempty"`
	Confirm *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func (*MessageCardEmbedSelectMenuBase) IsAction

func (m *MessageCardEmbedSelectMenuBase) IsAction()

func (*MessageCardEmbedSelectMenuBase) IsExtra

func (m *MessageCardEmbedSelectMenuBase) IsExtra()

type MessageCardEmbedSelectMenuPerson

type MessageCardEmbedSelectMenuPerson struct {
	*MessageCardEmbedSelectMenuBase
}

func (*MessageCardEmbedSelectMenuPerson) MarshalJSON

func (m *MessageCardEmbedSelectMenuPerson) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedSelectMenuPerson) Tag

type MessageCardEmbedSelectMenuStatic

type MessageCardEmbedSelectMenuStatic struct {
	*MessageCardEmbedSelectMenuBase
}

func (*MessageCardEmbedSelectMenuStatic) MarshalJSON

func (m *MessageCardEmbedSelectMenuStatic) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedSelectMenuStatic) Tag

type MessageCardEmbedSelectOption

type MessageCardEmbedSelectOption struct {
	Text     *MessageCardPlainText  `json:"text,omitempty"`
	Value    string                 `json:"value,omitempty"`
	URL      *string                `json:"url,omitempty"`
	MultiURL *MessageCardURL        `json:"multi_url,omitempty"`
	Type     *MessageCardButtonType `json:"type,omitempty"`
}

type MessageCardExtraElement

type MessageCardExtraElement interface {
	MessageCardElement
	IsExtra()
}

type MessageCardField

type MessageCardField struct {
	IsShort bool            `json:"is_short,omitempty"`
	Text    MessageCardText `json:"text,omitempty"`
}

type MessageCardHeader

type MessageCardHeader struct {
	Template *string               `json:"template,omitempty"`
	Title    *MessageCardPlainText `json:"title,omitempty"`
}

type MessageCardHr

type MessageCardHr struct {
}

func (*MessageCardHr) MarshalJSON

func (m *MessageCardHr) MarshalJSON() ([]byte, error)

func (*MessageCardHr) Tag

func (m *MessageCardHr) Tag() string

type MessageCardI18nElements added in v2.0.10

type MessageCardI18nElements struct {
	ZhCN []MessageCardElement `json:"zh_cn,omitempty"`
	EnUS []MessageCardElement `json:"en_us,omitempty"`
	JaJP []MessageCardElement `json:"ja_jp,omitempty"`
}

type MessageCardImage

type MessageCardImage struct {
	Alt          *MessageCardPlainText  `json:"alt,omitempty"`
	Title        MessageCardText        `json:"title,omitempty"`
	ImgKey       string                 `json:"img_key,omitempty"`
	CustomWidth  *int                   `json:"custom_width,omitempty"`
	CompactWidth *bool                  `json:"compact_width,omitempty"`
	Mode         *MessageCardImageModel `json:"mode,omitempty"`
	Preview      *bool                  `json:"preview,omitempty"`
}

func (*MessageCardImage) MarshalJSON

func (m *MessageCardImage) MarshalJSON() ([]byte, error)

func (*MessageCardImage) Tag

func (m *MessageCardImage) Tag() string

type MessageCardImageModel

type MessageCardImageModel string
const (
	MessageCardImageModelFitHorizontal MessageCardImageModel = "fit_horizontal"
	MessageCardImageModelCropCenter    MessageCardImageModel = "crop_center"
)

func (MessageCardImageModel) Ptr

type MessageCardLarkMd

type MessageCardLarkMd struct {
	Content string `json:"content,omitempty"`
}

func (*MessageCardLarkMd) IsExtra

func (m *MessageCardLarkMd) IsExtra()

func (*MessageCardLarkMd) IsNote

func (m *MessageCardLarkMd) IsNote()

func (*MessageCardLarkMd) MarshalJSON

func (m *MessageCardLarkMd) MarshalJSON() ([]byte, error)

func (*MessageCardLarkMd) Tag

func (m *MessageCardLarkMd) Tag() string

func (*MessageCardLarkMd) Text

func (m *MessageCardLarkMd) Text() string

type MessageCardMarkdown

type MessageCardMarkdown struct {
	Content string                     `json:"content,omitempty"`
	Href    map[string]*MessageCardURL `json:"href,omitempty"`
}

func (*MessageCardMarkdown) MarshalJSON

func (m *MessageCardMarkdown) MarshalJSON() ([]byte, error)

func (*MessageCardMarkdown) Tag

func (m *MessageCardMarkdown) Tag() string

type MessageCardNote

type MessageCardNote struct {
	Elements []MessageCardNoteElement `json:"elements,omitempty"`
}

func (*MessageCardNote) MarshalJSON

func (m *MessageCardNote) MarshalJSON() ([]byte, error)

func (*MessageCardNote) Tag

func (m *MessageCardNote) Tag() string

type MessageCardNoteElement

type MessageCardNoteElement interface {
	MessageCardElement
	IsNote()
}

type MessageCardPlainText

type MessageCardPlainText struct {
	Content string                    `json:"content,omitempty"`
	Lines   *int                      `json:"lines,omitempty"`
	I18n    *MessageCardPlainTextI18n `json:"i18n,omitempty"`
}

func (*MessageCardPlainText) IsExtra

func (m *MessageCardPlainText) IsExtra()

func (*MessageCardPlainText) IsNote

func (m *MessageCardPlainText) IsNote()

func (*MessageCardPlainText) MarshalJSON

func (m *MessageCardPlainText) MarshalJSON() ([]byte, error)

func (*MessageCardPlainText) Tag

func (m *MessageCardPlainText) Tag() string

func (*MessageCardPlainText) Text

func (m *MessageCardPlainText) Text() string

type MessageCardPlainTextI18n added in v2.0.10

type MessageCardPlainTextI18n struct {
	ZhCN string `json:"zh_cn,omitempty"`
	EnUS string `json:"en_us,omitempty"`
	JaJP string `json:"ja_jp,omitempty"`
}

type MessageCardText

type MessageCardText interface {
	MessageCardElement
	Text() string
}

type MessageCardURL

type MessageCardURL struct {
	URL        string `json:"url,omitempty"`
	AndroidURL string `json:"android_url,omitempty"`
	IOSURL     string `json:"ios_url,omitempty"`
	PCURL      string `json:"pc_url,omitempty"`
}

type MessageFile

type MessageFile struct {
	FileKey string `json:"file_key,omitempty"`
}

func (*MessageFile) JSON

func (m *MessageFile) JSON() (string, error)

type MessageImage

type MessageImage struct {
	ImageKey string `json:"image_key,omitempty"`
}

func (*MessageImage) JSON

func (m *MessageImage) JSON() (string, error)

type MessagePost

type MessagePost struct {
	ZhCN *MessagePostContent `json:"zh_cn,omitempty"`
	EnUS *MessagePostContent `json:"en_us,omitempty"`
	JaJP *MessagePostContent `json:"ja_jp,omitempty"`
}

func (*MessagePost) JSON

func (m *MessagePost) JSON() (string, error)

type MessagePostA

type MessagePostA struct {
	Text     string `json:"text,omitempty"`
	Href     string `json:"href,omitempty"`
	UnEscape bool   `json:"un_escape,omitempty"`
}

func (*MessagePostA) IsPost

func (m *MessagePostA) IsPost()

func (*MessagePostA) MarshalJSON

func (m *MessagePostA) MarshalJSON() ([]byte, error)

func (*MessagePostA) Tag

func (m *MessagePostA) Tag() string

type MessagePostAt

type MessagePostAt struct {
	UserId string `json:"user_id,omitempty"`
}

func (*MessagePostAt) IsPost

func (m *MessagePostAt) IsPost()

func (*MessagePostAt) MarshalJSON

func (m *MessagePostAt) MarshalJSON() ([]byte, error)

func (*MessagePostAt) Tag

func (m *MessagePostAt) Tag() string

type MessagePostContent

type MessagePostContent struct {
	Title   string                 `json:"title,omitempty"`
	Content [][]MessagePostElement `json:"content,omitempty"`
}

type MessagePostElement

type MessagePostElement interface {
	Tag() string
	IsPost()
	MarshalJSON() ([]byte, error)
}

type MessagePostImg

type MessagePostImg struct {
	ImageKey string `json:"image_key,omitempty"`
	Width    int    `json:"width,omitempty"`
	Height   int    `json:"height,omitempty"`
}

func (*MessagePostImg) IsPost

func (m *MessagePostImg) IsPost()

func (*MessagePostImg) MarshalJSON

func (m *MessagePostImg) MarshalJSON() ([]byte, error)

func (*MessagePostImg) Tag

func (m *MessagePostImg) Tag() string

type MessagePostText

type MessagePostText struct {
	Text     string `json:"text,omitempty"`
	UnEscape bool   `json:"un_escape,omitempty"`
}

func (*MessagePostText) IsPost

func (m *MessagePostText) IsPost()

func (*MessagePostText) MarshalJSON

func (m *MessagePostText) MarshalJSON() ([]byte, error)

func (*MessagePostText) Tag

func (m *MessagePostText) Tag() string

type MessageShareChat

type MessageShareChat struct {
	ChatId string `json:"chat_id,omitempty"`
}

func (*MessageShareChat) JSON

func (m *MessageShareChat) JSON() (string, error)

type MessageShareUser

type MessageShareUser struct {
	UserId string `json:"user_id,omitempty"`
}

func (*MessageShareUser) JSON

func (m *MessageShareUser) JSON() (string, error)

type MessageSticker

type MessageSticker struct {
	FileKey string `json:"file_key,omitempty"`
}

func (*MessageSticker) JSON

func (m *MessageSticker) JSON() (string, error)

type MessageText

type MessageText struct {
	Text string `json:"text,omitempty"`
}

func (*MessageText) JSON

func (m *MessageText) JSON() (string, error)

type MessageVideo

type MessageVideo struct {
	FileKey  string `json:"file_key,omitempty"`
	ImageKey string `json:"image_key,omitempty"`
}

func (*MessageVideo) JSON

func (m *MessageVideo) JSON() (string, error)

type RawRequest

type RawRequest struct {
	Header  http.Header
	RawBody []byte
}

func NewRawRequest

func NewRawRequest(req *http.Request) (*RawRequest, error)

func (RawRequest) JSONUnmarshalBody

func (req RawRequest) JSONUnmarshalBody(val interface{}) error

func (RawRequest) RequestId

func (req RawRequest) RequestId() string

func (RawRequest) String

func (req RawRequest) String() string

type RawResponse

type RawResponse struct {
	StatusCode int         `json:"-"`
	Header     http.Header `json:"-"`
	RawBody    []byte      `json:"-"`
}

func (RawResponse) JSONUnmarshalBody

func (resp RawResponse) JSONUnmarshalBody(val interface{}) error

func (RawResponse) RequestId

func (resp RawResponse) RequestId() string

func (RawResponse) String

func (resp RawResponse) String() string

func (RawResponse) Write

func (resp RawResponse) Write(writer http.ResponseWriter)

type RequestOptionFunc

type RequestOptionFunc func(option *requestOption)

func WithFileDownload

func WithFileDownload() RequestOptionFunc

func WithFileUpload

func WithFileUpload() RequestOptionFunc

func WithHTTPHeader

func WithHTTPHeader(header http.Header) RequestOptionFunc

func WithNeedHelpDeskAuth

func WithNeedHelpDeskAuth() RequestOptionFunc

func WithTenantKey

func WithTenantKey(tenantKey string) RequestOptionFunc

func WithUserAccessToken

func WithUserAccessToken(userAccessToken string) RequestOptionFunc

type Value

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

Directories

Path Synopsis
service
acs/v1
Package acs code generated by lark suite oapi sdk gen Package acs code generated by lark suite oapi sdk gen Package acs code generated by lark suite oapi sdk gen
Package acs code generated by lark suite oapi sdk gen Package acs code generated by lark suite oapi sdk gen Package acs code generated by lark suite oapi sdk gen
admin/v1
Package admin code generated by lark suite oapi sdk gen Package admin code generated by lark suite oapi sdk gen
Package admin code generated by lark suite oapi sdk gen Package admin code generated by lark suite oapi sdk gen
application/v1
Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen
Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen
application/v6
Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen
Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen Package application code generated by lark suite oapi sdk gen
authen/v1
Package authen code generated by lark suite oapi sdk gen Package authen code generated by lark suite oapi sdk gen
Package authen code generated by lark suite oapi sdk gen Package authen code generated by lark suite oapi sdk gen
aweme_ecosystem/v1
Package aweme_ecosystem code generated by lark suite oapi sdk gen Package aweme_ecosystem code generated by lark suite oapi sdk gen Package aweme_ecosystem code generated by lark suite oapi sdk gen
Package aweme_ecosystem code generated by lark suite oapi sdk gen Package aweme_ecosystem code generated by lark suite oapi sdk gen Package aweme_ecosystem code generated by lark suite oapi sdk gen
bitable/v1
Package bitable code generated by lark suite oapi sdk gen Package bitable code generated by lark suite oapi sdk gen
Package bitable code generated by lark suite oapi sdk gen Package bitable code generated by lark suite oapi sdk gen
calendar/v4
Package calendar code generated by lark suite oapi sdk gen Package calendar code generated by lark suite oapi sdk gen Package calendar code generated by lark suite oapi sdk gen
Package calendar code generated by lark suite oapi sdk gen Package calendar code generated by lark suite oapi sdk gen Package calendar code generated by lark suite oapi sdk gen
contact/v3
Package contact code generated by lark suite oapi sdk gen Package contact code generated by lark suite oapi sdk gen Package contact code generated by lark suite oapi sdk gen
Package contact code generated by lark suite oapi sdk gen Package contact code generated by lark suite oapi sdk gen Package contact code generated by lark suite oapi sdk gen
drive_explorer/v2
Package drive_explorer code generated by lark suite oapi sdk gen Package drive_explorer code generated by lark suite oapi sdk gen
Package drive_explorer code generated by lark suite oapi sdk gen Package drive_explorer code generated by lark suite oapi sdk gen
ehr/v1
Package ehr code generated by lark suite oapi sdk gen Package ehr code generated by lark suite oapi sdk gen
Package ehr code generated by lark suite oapi sdk gen Package ehr code generated by lark suite oapi sdk gen
face_verify/v1
Package face_verify code generated by lark suite oapi sdk gen Package face_verify code generated by lark suite oapi sdk gen
Package face_verify code generated by lark suite oapi sdk gen Package face_verify code generated by lark suite oapi sdk gen
human_authentication/v1
Package human_authentication code generated by lark suite oapi sdk gen Package human_authentication code generated by lark suite oapi sdk gen
Package human_authentication code generated by lark suite oapi sdk gen Package human_authentication code generated by lark suite oapi sdk gen
im/v1
Package im code generated by lark suite oapi sdk gen Package im code generated by lark suite oapi sdk gen Package im code generated by lark suite oapi sdk gen
Package im code generated by lark suite oapi sdk gen Package im code generated by lark suite oapi sdk gen Package im code generated by lark suite oapi sdk gen
image/v4
Package image code generated by lark suite oapi sdk gen Package image code generated by lark suite oapi sdk gen
Package image code generated by lark suite oapi sdk gen Package image code generated by lark suite oapi sdk gen
mail/v1
Package mail code generated by lark suite oapi sdk gen Package mail code generated by lark suite oapi sdk gen
Package mail code generated by lark suite oapi sdk gen Package mail code generated by lark suite oapi sdk gen
meeting_room/v1
Package meeting_room code generated by lark suite oapi sdk gen Package meeting_room code generated by lark suite oapi sdk gen Package meeting_room code generated by lark suite oapi sdk gen
Package meeting_room code generated by lark suite oapi sdk gen Package meeting_room code generated by lark suite oapi sdk gen Package meeting_room code generated by lark suite oapi sdk gen
optical_char_recognition/v1
Package optical_char_recognition code generated by lark suite oapi sdk gen Package optical_char_recognition code generated by lark suite oapi sdk gen
Package optical_char_recognition code generated by lark suite oapi sdk gen Package optical_char_recognition code generated by lark suite oapi sdk gen
search/v2
Package search code generated by lark suite oapi sdk gen Package search code generated by lark suite oapi sdk gen
Package search code generated by lark suite oapi sdk gen Package search code generated by lark suite oapi sdk gen
speech_to_text/v1
Package speech_to_text code generated by lark suite oapi sdk gen Package speech_to_text code generated by lark suite oapi sdk gen
Package speech_to_text code generated by lark suite oapi sdk gen Package speech_to_text code generated by lark suite oapi sdk gen
task/v1
Package task code generated by lark suite oapi sdk gen Package task code generated by lark suite oapi sdk gen Package task code generated by lark suite oapi sdk gen
Package task code generated by lark suite oapi sdk gen Package task code generated by lark suite oapi sdk gen Package task code generated by lark suite oapi sdk gen
tenant/v2
Package tenant code generated by lark suite oapi sdk gen Package tenant code generated by lark suite oapi sdk gen
Package tenant code generated by lark suite oapi sdk gen Package tenant code generated by lark suite oapi sdk gen
translation/v1
Package translation code generated by lark suite oapi sdk gen Package translation code generated by lark suite oapi sdk gen
Package translation code generated by lark suite oapi sdk gen Package translation code generated by lark suite oapi sdk gen
vc/v1
Package vc code generated by lark suite oapi sdk gen Package vc code generated by lark suite oapi sdk gen Package vc code generated by lark suite oapi sdk gen
Package vc code generated by lark suite oapi sdk gen Package vc code generated by lark suite oapi sdk gen Package vc code generated by lark suite oapi sdk gen

Jump to

Keyboard shortcuts

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