site

package
v1.9.18 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package site 橙子建站落地页管理 API models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Background added in v1.8.5

type Background struct {
	// Type 背景类型:color 颜色、image 图片
	Type string `json:"type,omitempty"`
	// Color 景颜色信息,比如“rgba(255,255,255,1)”,默认为无
	Color string `json:"color,omitempty"`
	// Image 背景图片,background的type 为image时,可自行上传图片url,或从获取图片素材获取图片ID:id
	Image string `json:"image,omitempty"`
}

Background 背景信息,type为imageText样式时有效

type BaseBrick

type BaseBrick struct {
	// Name 组件类型
	Name string `json:"name,omitempty"`
	// X 横轴,代表当前组件在布局中的左右位置,默认为0
	X int `json:"x,omitempty"`
	// Y 纵轴,代表当前组件在布局中的上下位置,默认为0
	Y int `json:"y,omitempty"`
	// Width 宽度,默认为375,范围:width >= 1
	Width int `json:"width,omitempty"`
	// Height 高度,默认为225,范围:height >= 1
	Height int `json:"height,omitempty"`
	// Float 站点组件浮动方式: none(默认为无);其他值可选:top(置顶);right(居右);bottom(置底)
	Float string `json:"float,omitempty"`
}

BaseBrick 基础组件信息

func (BaseBrick) Type added in v1.8.4

func (b BaseBrick) Type() BrickType

type BaseEvent added in v1.8.4

type BaseEvent struct {
	Name string `json:"name,omitempty"`
}

func (BaseEvent) Type added in v1.8.4

func (e BaseEvent) Type() EventType

type Brick

type Brick interface {
	Type() BrickType
}

Brick 站点业务数据

type BrickType

type BrickType string
const (
	// XrVideo 视频组件
	XrVideo BrickType = "XrVideo"
	// XrPicture 图片组件
	XrPicture BrickType = "XrPicture"
	// XrPictureGroup 组图组件
	XrPictureGroup BrickType = "XrPictureGroup"
	// XrSimpleText 文本组件
	XrSimpleText BrickType = "XrSimpleText"
	// XrRichText 富文本组件
	XrRichText BrickType = "XrRichText"
	// XrForm 表单组件
	XrForm BrickType = "XrForm"
	// XrButton 按钮组件
	XrButton BrickType = "XrButton"
)

type ButtonBgType

type ButtonBgType string

ButtonBgType 背景类型

const (
	// ButtonBgType_COLOR 默认值
	ButtonBgType_COLOR ButtonBgType = "color"
	// ButtonBgType_IMAGE 图片
	ButtonBgType_IMAGE ButtonBgType = "image"
)

type ButtonBrick

type ButtonBrick struct {
	BaseBrick
	// Icon 图标信息,icon类型值:
	// none(缺省)
	// consult(咨询图标)
	// telephone(电话图标)
	// download(下载图标)
	Icon IconType `json:"icon,omitempty"`
	// BgType 背景类型,可选值:color(默认值),image(图片)
	BgType ButtonBgType `json:"bg_type,omitempty"`
	// Text 文案,bg_type 为color时,有效且必填
	Text string `json:"text,omitempty"`
	// Color 文案颜色信息,默认值rgba(255,255,255,1)
	Color string `json:"color,omitempty"`
	// FontSize 文案字号,默认值16
	FontSize int `json:"font_size,omitempty"`
	// BgColor 背景颜色信息,比如“rgba(255,255,255,1)”,默认为无
	BgColor string `json:"bg_color,omitempty"`
	// BgImage 背景图片,bg_type 为image时,有效且必填;可自行上传图片url,或从获取图片素材获取图片ID:id
	BgImage string `json:"bg_image,omitempty"`
	// BorderColor 边框颜色信息,比如“rgba(255,255,255,1)”,默认为无
	BorderColor string `json:"border_color,omitempty"`
	// BorderWidth 边框粗细,默认0
	BorderWidth float64 `json:"border_width,omitempty"`
	// BorderRadius 边框圆角,默认为0,范围:radius >= 0
	BorderRadius float64 `json:"border_radius,omitempty"`
	// Events 事件列表信息
	Events []ButtonEvent `json:"events,omitempty"`
	// PackageInfo 应用下载样式
	PackageInfo *PackageInfo `json:"package_info,omitempty"`
}

ButtonBrick 按钮组件

func (ButtonBrick) Type

func (b ButtonBrick) Type() BrickType

Type implement Brick interface

type ButtonEvent

type ButtonEvent struct {
	// Trigger 触发
	Trigger *EventTrigger `json:"trigger,omitempty"`
	// Behavior 事件行为描述,behavior目前已开放DownloadEvent 和LinkEvent以及TelephoneEvent
	Behavior Event `json:"behavior,omitempty"`
}

ButtonEvent 事件信息

func (*ButtonEvent) UnmarshalJSON added in v1.8.4

func (e *ButtonEvent) UnmarshalJSON(b []byte) error

type CopyRequest

type CopyRequest struct {
	// AdvertiserID 广告主id,数字范围:1 <= advertiser_id <= MAX_INT64
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteIDs 站点id列表, min_size=1, max_size=20
	SiteIDs []string `json:"site_ids,omitempty"`
}

CopyRequest 建站工具-建站复制 API Request

func (CopyRequest) Encode

func (r CopyRequest) Encode() []byte

implement PostRequest interface

type CopyResponse

type CopyResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *CopyResponseData `json:"data,omitempty"`
}

CopyResponse 建站工具-建站复制 API Response

type CopyResponseData

type CopyResponseData struct {
	// SuccessList 复制成功列表,整体失败不返回该列表
	SuccessList []CopyResult `json:"success_list,omitempty"`
	// ErrorList 复制失败列表,整体成功不返回该列表
	ErrorList []CopyResult `json:"error_list,omitempty"`
}

CopyResponseData json 返回值

type CopyResult

type CopyResult struct {
	// OriginSiteID 返回复制成功的原站点id
	OriginSiteID model.FlexUint64 `json:"origin_site_id,omitempty"`
	// SiteID 返回复制成功后生成的新站点id
	SiteID model.FlexUint64 `json:"site_id,omitempty"`
}

CopyResult 复制结果

type CreateRequest

type CreateRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Name 站点名称,范围:长度 >= 1
	Name string `json:"name,omitempty"`
	// Bricks 站点业务数据。具体的格式见下方的7大组件格式,list中每个object在站点页面上按照顺序从上到下排列。
	Bricks []Brick `json:"bricks,omitempty"`
}

CreateRequest 创建橙子建站站点 API Request

func (CreateRequest) Encode

func (r CreateRequest) Encode() []byte

Encode implement PostRequest interface

type CreateResponse

type CreateResponse struct {
	model.BaseResponse
	// Data json返回值
	Data struct {
		// SiteID 站点id
		SiteID uint64 `json:"site_id,omitempty"`
	} `json:"data,omitempty"`
}

CreateResponse 创建橙子建站站点 API Response

type Description added in v1.8.5

type Description struct {
	// Type 描述展示类型:label 标签、text 文本
	Type string `json:"type,omitempty"`
	// Labels 标签内容,description的type为label时有效
	Labels []string `json:"labels,omitempty"`
	// Color 文字颜色,比如“rgba(255,255,255,1)”,默认为无
	Color string `json:"color,omitempty"`
	// FontSize 文字大小,默认15
	FontSize int `json:"font_size,omitempty"`
}

Description 应用包描述,type为imageText样式时有效

type DownloadEvent

type DownloadEvent struct {
	BaseEvent
	// IOSLink ios链接信息
	IOSLink *Link `json:"ios_link,omitempty"`
	// AndroidLink 安卓链接信息
	AndroidLink *Link `json:"android_link,omitempty"`
}

DownloadEvent DownloadEvent事件行为描述 特殊说明:基于应用下载安全要求,在创建和修改站点接口中,如果希望添加应用下载链接,有两种情况:①DownloadEvent类型的按钮组件可以填入安卓/IOS下载链接;②LinkEvent类型的按钮组件的URL支持落地页链接和IOS下载链接,不支持安卓下载链接,仅DownloadEvent事件下的安卓URL参数下可填写安卓下载链接;综上,除了这两种情况外其他建站组件中的URL参数都不允许填入应用下载链接,如果填入将会创建失败。

func (DownloadEvent) Type

func (e DownloadEvent) Type() EventType

Type implement Event interface

type Event

type Event interface {
	Type() EventType
}

Event 事件行为信息

type EventTrigger

type EventTrigger struct {
	// Type 触发事件,可选值:
	// click(点击)
	// longTouch(长按)
	Type TriggerType `json:"type,omitempty"`
	// TouchSeconds 长按时间(秒):触发时间为longTouch类型,必填;长按时间 >= 1
	TouchSeconds int64 `json:"touch_seconds,omitempty"`
}

EventTrigger 事件触发条件

type EventType

type EventType string

EventType 事件行为类型

const (
	// EventType_DownloadEvent DownloadEvent事件行为
	EventType_DownloadEvent EventType = "DownloadEvent"
	// EventType_LinkEvent LinkEvent事件行为描述
	EventType_LinkEvent EventType = "LinkEvent"
	// EventType_TelephoneEvent TelephoneEvent事件行为描述
	EventType_TelephoneEvent EventType = "TelephoneEvent"
)

type FailMessage

type FailMessage struct {
	// Message 错误信息
	Message string `json:"message,omitempty"`
	// SiteID 更新失败的site_id
	SiteID model.FlexUint64 `json:"site_id,omitempty"`
}

FailMessage 错误信息

type FontStyle

type FontStyle string

FontStyle 文字样式

const (
	// FontStyle_BOLD 黑体
	FontStyle_BOLD FontStyle = "bold"
	// FontStyle_ITALIC 斜体
	FontStyle_ITALIC FontStyle = "italic"
	// FontStyle_UNDERLINE 下划线
	FontStyle_UNDERLINE FontStyle = "underline"
)

type Form

type Form struct {
	// FormID 落地页表单id
	FormID uint64 `json:"form_id,omitempty"`
	// FormIndex 落地页表单位置
	FormIndex int `json:"form_index,omitempty"`
	// FormName 落地页表单名字
	FormName string `json:"form_name,omitempty"`
}

Form 落地页表单

type FormBrick

type FormBrick struct {
	BaseBrick
	// FormData 表单数据
	FormData *FormData `json:"form_data,omitempty"`
}

FormBrick 表单组件

func (FormBrick) Type

func (b FormBrick) Type() BrickType

Type implement Brick interface

type FormData

type FormData struct {
	// InstanceID 已有表单,如果传入instance_id,以此为准,其他表单数据不再读取; 当传表单数据时,submit_text和name为空时必填
	InstanceID uint64 `json:"instance_id,omitempty"`
	// SubmitText 提交文案;当传表单数据时,无instance_id时, 必填
	SubmitText string `json:"submit_text,omitempty"`
	// Name 表单名称;当传表单数据时,无instance_id时, 必填
	Name string `json:"name,omitempty"`
	// Elements 表单元素
	Elements []FormElement `json:"elements,omitempty"`
	// SuccessLink 用户提交成功跳转链接
	SuccessLink *Link `json:"success_link,omitempty"`
	// FailureLink 提交失败跳转链接
	FailureLink *Link `json:"failure_link,omitempty"`
	// Linkable 表单提交后是否跳转; 允许值:0(不跳转),1(跳转)
	Linkable int `json:"linkable"`
	// SuccessTip 用户提交成功提示语表示用户填写表单成功后以小窗方式弹出的提示信息,比如告诉用户24小时后商家会主动联系用户,长度不超过128,默认值“表单提交成功”
	SuccessTip string `json:"success_tip,omitempty"`
}

FormData 表单数据

type FormElement

type FormElement struct {
	// Label 元素标签
	Label string `json:"label,omitempty"`
	// AllowEmpty 是否允许为空 允许值:0(必填),1(可为空)
	AllowEmpty int `json:"allow_empty,omitempty"`
	// Type 表单元素类型
	// 允许值:
	// NAME(姓名)
	// TELEPHONE(电话)
	// EMAIL(邮箱)
	// NUMBER(数值)
	// SEX(性别)
	// DATE(日期)
	// CITY(城市)
	// TEXT(文本)
	// TEXTAREA(文本域)
	// 当allow_empty为0时必填
	Type FormType `json:"type,omitempty"`
	// IsUnique 是否可重复; 允许值:0(唯一),1(可重复)
	IsUnique int `json:"is_unique"`
}

FormElement 表单元素

type FormType

type FormType string

FormType 表单元素类型

const (
	// FormType_NAME 姓名
	FormType_NAME FormType = "NAME"
	// FormType_TELEPHONE 电话
	FormType_TELEPHONE FormType = "TELEPHONE"
	// FormType_EMAIL 邮箱
	FormType_EMAIL FormType = "EMAIL"
	// FormType_NUMBER 数值
	FormType_NUMBER FormType = "NUMBER"
	// FormType_SEX 性别
	FormType_SEX FormType = "SEX"
	// FormType_DATE 日期
	FormType_DATE FormType = "DATE"
	// FormType_CITY 城市
	FormType_CITY FormType = "CITY"
	// FormType_TEXT 文本
	FormType_TEXT FormType = "TEXT"
	// FormType_TEXTAREA 文本域
	FormType_TEXTAREA FormType = "TEXTAREA"
)

type FormsListRequest

type FormsListRequest struct {
	// AdvertiserID 广告主id,数字范围:1 <= advertiser_id <= MAX_INT64
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteID 站点id
	SiteID uint64 `json:"site_id,omitempty"`
}

FormsListRequest 获取落地页预约表单信息 API Request

func (FormsListRequest) Encode

func (r FormsListRequest) Encode() string

Encode implement GetRequest interface

type FormsListResponse

type FormsListResponse struct {
	model.BaseResponse
	Data struct {
		List []Form `json:"list,omitempty"`
	} `json:"data,omitempty"`
}

FormsListResponse 获取落地页预约表单信息 API Response

type GetFiltering

type GetFiltering struct {
	// Search 搜索字段,按照建站id和建站name进行模糊匹配,范围:1 <= 长度 <= 50
	Search string `json:"search,omitempty"`
}

GetFiltering 过滤字段

type GetRequest

type GetRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Page 页数默认值: 1,page必须大于0
	Page int `json:"page,omitempty"`
	// PageSize 页面大小默认值:10,page_size范围为1-1000
	PageSize int `json:"page_size,omitempty"`
	// Status 建站粗粒度状态
	Status enum.SiteSearchStatus `json:"status,omitempty"`
	// Filtering 过滤字段
	Filtering *GetFiltering `json:"filtering,omitempty"`
}

GetRequest 获取橙子建站站点列表 API Request

func (GetRequest) Encode

func (r GetRequest) Encode() string

Encode implement GetRequest interface

type GetResponse

type GetResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *GetResponseData `json:"data,omitempty"`
}

GetResponse 获取橙子建站站点列表 API Response

type GetResponseData

type GetResponseData struct {
	// List 站点列表
	List []Site `json:"list,omitempty"`
	// PageInfo 分页信息
	PageInfo *model.PageInfo `json:"page_info,omitempty"`
}

GetResponseData json返回值

type HandselRequest

type HandselRequest struct {
	// AdvertiserID 广告主id,数字范围:1 <= advertiser_id <= MAX_INT64
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteIDs 站点id列表, min_size=1, max_size=20
	SiteIDs []string `json:"site_ids,omitempty"`
	// TargetAdvertiserIDs 目标广告主id列表, min_size=1, max_size=20
	TargetAdvertiserIDs []string `json:"target_advertiser_ids,omitempty"`
}

HandselRequest 建站工具-建站转赠 API Request

func (HandselRequest) Encode

func (r HandselRequest) Encode() []byte

implement PostRequest interface

type HandselResponse

type HandselResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *HandselResponseData `json:"data,omitempty"`
}

HandselResponse 建站工具-建站转赠 API Response

type HandselResponseData

type HandselResponseData struct {
	// SuccessList 转赠成功列表,整体失败不返回该列表
	SuccessList []HandselResult `json:"success_list,omitempty"`
	// ErrorList 转赠失败列表,整体成功不返回该列表
	ErrorList []HandselResult `json:"error_list,omitempty"`
}

HandselResponseData json 返回值

type HandselResult

type HandselResult struct {
	// OriginSiteID 返回转赠成功的原site_ids
	OriginSiteID model.FlexUint64 `json:"origin_site_id,omitempty"`
	// SiteID 转赠成功后的生成的新站点id,失败的数据无此参数返回
	SiteID model.FlexUint64 `json:"site_id,omitempty"`
	// TargetAdvertiserID 返回转赠成功的目标广告主id
	TargetAdvertiserID model.FlexUint64 `json:"target_advertiser_id,omitempty"`
}

HandselResult 转赠结果

type IconType

type IconType string

IconType 图标信息

const (
	// IconType_NONE 缺省
	IconType_NONE IconType = "none"
	// IconType_CONSULT 咨询图标
	IconType_CONSULT IconType = "consult"
	// IconType_TELEPHONE 电话图标
	IconType_TELEPHONE IconType = "telephone"
	// IconType_DOWNLOAD 下载图标
	IconType_DOWNLOAD IconType = "download"
)

type ImageBrick

type ImageBrick struct {
	BaseBrick
	// ImageURL 图片链接,用户自行上传图片url,image_url 和图片ic_id 必须传一个。如果都传,取image_url值
	ImageURL string `json:"image_url,omitempty"`
	// IcID 图片ID(素材图片id),对应【获取图片素材】接口获得的id; image_url和图片ic_id 必须传一个。如果都传,取image_url值。
	IcID string `json:"ic_id,omitempty"`
	// Tag 标签,用户自定义标注,类似图片字幕,默认为无
	Tag string `json:"tag,omitempty"`
	// BorderRadius 边框圆角,默认为0,范围:radius >= 0
	BorderRadius float64 `json:"border_radius,omitempty"`
	// Link 图片跳转链接信息
	Link *Link `json:"link,omitempty"`
	// IsCover 是否保持宽高比 , 1: 表示保持宽高比, 0:不保持
	IsCover bool `json:"is_cover"`
}

ImageBrick 图片组件

func (ImageBrick) Type

func (b ImageBrick) Type() BrickType

Type implement Brick interface

type ImagesBrick

type ImagesBrick struct {
	BaseBrick
	// GroupType 组图类型,默认normal;允许值:常规居中normal;平铺拉伸carousel;拼接覆盖coverflow
	GroupType ImagesBrickGroupType `json:"group_type,omitempty"`
	// AutoPlay 是否自动播放,默认自动播放;允许值:0(不自动),1(自动播放)
	AutoPlay int `json:"auto_play"`
	// GroupContent 组图内容列表
	GroupContent []ImageBrick `json:"group_content,omitempty"`
}

ImagesBrick 组图组件

func (ImagesBrick) Type

func (b ImagesBrick) Type() BrickType

Type implement Brick interface

type ImagesBrickGroupType

type ImagesBrickGroupType string

ImagesBrickGroupType 组图类型

const (
	// ImagesBrickGroupType_NORMAL 常规居中
	ImagesBrickGroupType_NORMAL ImagesBrickGroupType = "normal"
	// ImagesBrickGroupType_CAROUSEL 平铺拉伸
	ImagesBrickGroupType_CAROUSEL ImagesBrickGroupType = "carousel"
	// ImagesBrickGroupType_COVERFLOW 拼接覆盖
	ImagesBrickGroupType_COVERFLOW ImagesBrickGroupType = "coverflow"
)
type Link struct {
	// URL 链接地址,当link_type为url时,必填
	URL string `json:"url,omitempty"`
	// Scheme scheme地址,当link_type为scheme时,必填
	Scheme string `json:"scheme,omitempty"`
	// QuickApp 快应用地址,当link_type为quick_app时,必填;获取快应用链接可参考【快应用官方网站】
	QuickApp string `json:"quick_app,omitempty"`
	// LinkType 链接类型,可传值有:url:链接地址,sheme:scheme地址,quickApp:快应用地址,当传递链接信息参数时,必填
	LinkType LinkType `json:"link_type,omitempty"`
	// Description 应用描述,为了展示效果,推荐12个中文字符长度
	Description string `json:"description,omitempty"`
}

Link 跳转链接信息

type LinkEvent

type LinkEvent struct {
	BaseEvent
	// Link 链接信息(支持落地页链接和IOS下载链接,不支持安卓下载链接,仅DownloadEvent事件下的安卓URL参数下可填写安卓下载链接)
	Link *Link `json:"link,omitempty"`
}

LinkEvent LinkEvent事件行为描述

func (LinkEvent) Type

func (e LinkEvent) Type() EventType

Type implement Event interface

type LinkType

type LinkType string

LinkType 链接类型

const (
	// LinkType_URL 链接地址
	LinkType_URL LinkType = "url"
	// LinkType_SCHEME scheme地址
	LinkType_SCHEME LinkType = "scheme"
	// LinkType_QUICK_APP 快应用地址
	LinkType_QUICK_APP LinkType = "quickApp"
)

type PackageInfo added in v1.8.5

type PackageInfo struct {
	// Type 展示样式:imageText 图片文字、image 图片
	Type string `json:"type,omitepty"`
	// Image type为“image”样式时有效,可自行上传图片url,或从获取图片素材获取图片ID:id
	Image string `json:"image,omitempty"`
	// Background 背景信息,type为imageText样式时有效
	Background *Background `json:"background,omitempty"`
	// Description 应用包描述,type为imageText样式时有效
	Description *Description `json:"description,omitempty"`
	// Title 标题配置,type为imageText样式时有效
	Title *Title `json:"title,omitempty"`
}

PackageInfo 应用下载样式

type PreviewRequest

type PreviewRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteID 站点id
	SiteID uint64 `json:"site_id,omitempty"`
}

PreviewRequest 获取橙子建站站点预览地址 API Request

func (PreviewRequest) Encode

func (r PreviewRequest) Encode() string

Encode implement GetRequest interface

type PreviewResponse

type PreviewResponse struct {
	model.BaseResponse
	// Data json返回值
	Data struct {
		// URL 站点URL
		URL string `json:"url,omitempty"`
	} `json:"data,omitempty"`
}

PreviewResponse 获取橙子建站站点预览地址 API Response

type ReadRequest

type ReadRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteID 橙子建站站点id列表 :1 <= 长度 <= 20
	SiteID uint64 `json:"site_id,omitempty"`
}

ReadRequest 获取橙子建站站点详细信息 API Request

func (ReadRequest) Encode

func (r ReadRequest) Encode() string

Encode implement GetRequest interface

type ReadResponse

type ReadResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *SiteDetail `json:"data,omitempty"`
}

ReadResponse 获取橙子建站站点详细信息 API Response

type RichTextBrick

type RichTextBrick struct {
	BaseBrick
	// Content 文本内容,长度至少为1
	Content string `json:"content,omitempty"`
	// Link 跳转链接信息
	Link *Link `json:"link,omitempty"`
	// FontFamily 文本字体
	// 文本字体支持如下: font-x
	// x 的值可为:
	// 0(系统默认字体)
	// 4(方正仿宋简体)
	// 7(方正黑体简体)
	// 10(方正楷体简体)
	// 13(方正书宋简体)
	// 14(华文琥珀)
	// 15(华文隶书)
	// 16(华文新魏)
	// 17(华文行楷)
	// 23(濑户字体)
	// 24(庞门正道标题体)
	// 32(书体坊颜体)
	// 90(文泉驿正黑)
	// 94(杨任东竹石体)
	// 95(站酷高端黑)
	// 96(站酷酷黑)
	// 97(站酷快乐体)
	// 100(装甲明朝体)
	// 101(思源黑体粗体)
	// 102(思源黑体黑体)
	// 103(思源黑体细体)
	// 104(思源黑体纤细)
	// 105(思源黑体中黑)
	// 106(思源黑体常规)
	// 107(思源黑体极细)
	FontFamily int `json:"font_family,omitempty"`
	// FontSize 字号,默认值为14
	FontSize int `json:"font_size,omitempty"`
	// FontStyle 文字样式,可选值:
	// 黑体bold
	// 斜体italic
	// 下划线underline,
	// 默认为无样式。可随意组合
	FontStyle FontStyle `json:"font_style,omitempty"`
	// LetterSpacing 字间距,默认值为0
	LetterSpacing int `json:"letter_spacing,omitempty"`
	// LineHeight 行高,例如:1.3
	LineHeight float64 `json:"line_height,omitempty"`
	// TextAlign 对齐方式,可选值:
	// left(左对齐)
	// right(左对齐)
	// center(居中)
	// 默认为左对齐
	TextAlign TextAlign `json:"text_align,omitempty"`
}

RichTextBrick 富文本组件

func (RichTextBrick) Type

func (b RichTextBrick) Type() BrickType

Type implement Brick interface

type Site

type Site struct {
	// SiteID 站点ID
	SiteID model.FlexUint64 `json:"siteId,omitempty"`
	// Name 建站名称
	Name string `json:"name,omitempty"`
	// Status 站点状态
	Status enum.SiteStatus `json:"status,omitempty"`
	// SiteType 建站类型
	SiteType enum.SiteType `json:"siteType,omitempty"`
	// FunctionType 建站类别,SITE_FUNC_TYPE_NEW_MODULAR(智能建站)SITE_FUNC_TYPE_NORMAL (普通建站)
	FunctionType enum.SiteFunctionType `json:"function_type,omitempty"`
	// Thumbnail 缩略图
	Thumbnail string `json:"thumbnail,omitempty"`
}

Site 站点信息

type SiteDetail

type SiteDetail struct {
	// Bricks 具体见返回示例业务数据(新建或更新时传递的数据)
	Bricks []Brick `json:"bricks,omitempty"`
	// ID 站点ID
	ID model.FlexUint64 `json:"id,omitempty"`
	// Status 站点状态
	Status enum.SiteStatus `json:"status,omitempty"`
	// SiteType 建站类型
	SiteType enum.SiteType `json:"site_type,omitempty"`
	// Thumbnail 缩略图
	Thumbnail string `json:"thumbnail,omitempty"`
}

SiteDetail 站点信息

func (*SiteDetail) UnmarshalJSON added in v1.8.4

func (s *SiteDetail) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

type SmartPhone

type SmartPhone struct {
	// InstanceID 表单ID,如果传入instance_id,以此为准,其他智能电话数据不再读取
	InstanceID uint64 `json:"instance_id,omitempty"`
	// Name 新建智能电话的名称,无instance_id时, 必填
	Name string `json:"name,omitempty"`
	// PhoneNumber 电话号码,无instance_id时, 必填
	PhoneNumber string `json:"phone_number,omitempty"`
	// CallDisplay 是否展示真实号码,默认现实中间虚拟号码。
	// 默认值:0(中间虚拟号码)
	// 允许值:0(中间虚拟号码)、 1(用户真实号码)
	// 【注】显示用户真实号码可能会被运营商拦截,发生拨打异常情况时可选择来电展示中间虚拟号码。
	CallDisplay int `json:"call_display,omitempty"`
}

SmartPhone 智能电话信息

type TelephoneEvent

type TelephoneEvent struct {
	BaseEvent
	// SmartPhone 智能电话信息
	SmartPhone *SmartPhone `json:"smart_phone,omitempty"`
}

TelephoneEvent TelephoneEvent事件行为描述

func (TelephoneEvent) Type

func (e TelephoneEvent) Type() EventType

Type implement Event interface

type TextAlign

type TextAlign string

TextAlign 对齐方式

const (
	// TextAlign_LEFT 左对齐
	TextAlign_LEFT TextAlign = "left"
	// TextAlign_RIGHT 右对齐
	TextAlign_RIGHT TextAlign = "right"
	// TextAlign_CENTER 居中
	TextAlign_CENTER TextAlign = "center"
)

type TextBrick

type TextBrick struct {
	BaseBrick
	// Content 文本内容,长度至少为1
	Content string `json:"content,omitempty"`
	// Link 跳转链接信息
	Link *Link `json:"link,omitempty"`
}

TextBrick 文本组件

func (TextBrick) Type

func (b TextBrick) Type() BrickType

Type implement Brick interface

type Title added in v1.8.5

type Title struct {
	// Color 文字颜色,比如“rgba(255,255,255,1)”,默认为无
	Color string `json:"color,omitempty"`
	// FontSize 文字大小,默认15
	FontSize int `json:"font_size,omitempty"`
}

Title 标题配置,type为imageText样式时有效

type TriggerType

type TriggerType string

TriggerType 触发事件

const (
	// TriggerType_CLICK 点击
	TriggerType_CLICK TriggerType = "click"
	// TriggerType_LONG_TOUCH 长按
	TriggerType_LONG_TOUCH TriggerType = "longTouch"
)

type UpdateRequest

type UpdateRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteID 站点id,范围:长度 >= 1
	SiteID string `json:"site_id,omitempty"`
	// Name 站点名称,范围:长度 >= 1
	Name string `json:"name,omitempty"`
	// Bricks 站点业务数据。具体的格式见下方的7大组件格式,list中每个object在站点页面上按照顺序从上到下排列。
	Bricks []Brick `json:"bricks,omitempty"`
}

UpdateRequest 修改橙子建站站点 API Request

func (UpdateRequest) Encode

func (r UpdateRequest) Encode() []byte

Encode implement PostRequest interface

type UpdateStatusRequest

type UpdateStatusRequest struct {
	// AdvertiserID 广告主id
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// SiteIDs 橙子建站站点id列表 :1 <= 长度 <= 20; 可通过【获取橙子建站站点列表】获取应答字段list
	SiteID []string `json:"site_ids,omitempty"`
	// Status 站点操作状态
	Status enum.SiteOptStatus `json:"status,omitempty"`
}

UpdateStatusRequest 修改橙子建站站点状态 API Request

func (UpdateStatusRequest) Encode

func (r UpdateStatusRequest) Encode() []byte

Encode implement PostRequest interface

type UpdateStatusResponse

type UpdateStatusResponse struct {
	model.BaseResponse
	// Data json 返回值
	Data *UpdateStatusResponseData `json:"data,omitempty"`
}

UpdateStatusResponse 更改橙子建站站点状态 API Response

type UpdateStatusResponseData

type UpdateStatusResponseData struct {
	// Success 更新成功的site_id 列表。如果全部更新失败,len(list) = 0
	Success []string `json:"success,omitempty"`
	// Fail 更新失败的site_id的list及失败的原因。如果全部更新成功,len(list) = 0
	Fail []FailMessage `json:"fail,omitempty"`
}

UpdateStatusResponseData json 返回值

type VideoBrick

type VideoBrick struct {
	BaseBrick
	// LocalSource 本地视频信息,与在线视频信息传其中一个
	LocalSource *VideoSource `json:"local_source,omitempty"`
	// OnlineSource 在线视频信息,与本地视频信息传其中一个
	OnlineSource *VideoSource `json:"online_source,omitempty"`
}

VideoBrick 视频组件

func (VideoBrick) Type

func (b VideoBrick) Type() BrickType

Type implement Brick interface

type VideoSource

type VideoSource struct {
	// Vid 视频云id, 用户自行上传,local_source不空时,必填
	Vid string `json:"vid,omitempty"`
	// Poster 视频封面图信息,local_source不空时,必填支持填写在【获取图片素材】返回的图片id(推荐)和自行上传的图片url
	Poster string `json:"poster,omitempty"`
	// OriginURL 视频原始地址,例如https://v.youku.com/v_show/id_xxx.html ,online_source不空时必填
	OriginURL string `json:"origin_url,omitempty"`
	// PosterURL 封面图url,用户自定义上传
	PosterURL string `json:"poster_url,omitempty"`
}

VideoSource 视频信息

Jump to

Keyboard shortcuts

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