Help us shape the future of Go! Take the 2026 Go Developer Survey

preview

package
v0.20.7 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetPreviewReq_Password_DEFAULT string
View Source
var PreviewData_Duration_DEFAULT int32
View Source
var PreviewData_FileSize_DEFAULT int64
View Source
var PreviewData_Height_DEFAULT int32
View Source
var PreviewData_MimeType_DEFAULT string
View Source
var PreviewData_PageCount_DEFAULT int32
View Source
var PreviewData_PreviewURL_DEFAULT string
View Source
var PreviewData_TextContent_DEFAULT string
View Source
var PreviewData_Thumbnail_DEFAULT string
View Source
var PreviewData_Width_DEFAULT int32

Functions

This section is empty.

Types

type GetPreviewReq

type GetPreviewReq struct {
	Code string `thrift:"code,1,required" json:"code,required" path:"code,required"`
	// 取件密码经请求头传递(同批随 core v0.24.0 收敛,与 GetShareReq 同口径):
	// query 形态有访问日志/浏览器历史/Referer 泄漏面
	Password *string `thrift:"password,2,optional" header:"X-Share-Password" json:"password,omitempty"`
}

==================== 获取预览 ====================

var PreviewServiceGetPreviewArgs_Req_DEFAULT *GetPreviewReq

func NewGetPreviewReq

func NewGetPreviewReq() *GetPreviewReq

func (*GetPreviewReq) GetCode

func (p *GetPreviewReq) GetCode() (v string)

func (*GetPreviewReq) GetPassword

func (p *GetPreviewReq) GetPassword() (v string)

func (*GetPreviewReq) InitDefault

func (p *GetPreviewReq) InitDefault()

func (*GetPreviewReq) IsSetPassword

func (p *GetPreviewReq) IsSetPassword() bool

func (*GetPreviewReq) Read

func (p *GetPreviewReq) Read(iprot thrift.TProtocol) (err error)

func (*GetPreviewReq) ReadField1

func (p *GetPreviewReq) ReadField1(iprot thrift.TProtocol) error

func (*GetPreviewReq) ReadField2

func (p *GetPreviewReq) ReadField2(iprot thrift.TProtocol) error

func (*GetPreviewReq) String

func (p *GetPreviewReq) String() string

func (*GetPreviewReq) Write

func (p *GetPreviewReq) Write(oprot thrift.TProtocol) (err error)

type GetPreviewResp

type GetPreviewResp struct {
	Code    int32        `thrift:"code,1,required" form:"code,required" json:"code,required"`
	Message string       `thrift:"message,2,required" form:"message,required" json:"message,required"`
	Data    *PreviewData `thrift:"data,3,optional" form:"data" json:"data,omitempty"`
}
var PreviewServiceGetPreviewResult_Success_DEFAULT *GetPreviewResp

func NewGetPreviewResp

func NewGetPreviewResp() *GetPreviewResp

func (*GetPreviewResp) GetCode

func (p *GetPreviewResp) GetCode() (v int32)

func (*GetPreviewResp) GetData

func (p *GetPreviewResp) GetData() (v *PreviewData)

func (*GetPreviewResp) GetMessage

func (p *GetPreviewResp) GetMessage() (v string)

func (*GetPreviewResp) InitDefault

func (p *GetPreviewResp) InitDefault()

func (*GetPreviewResp) IsSetData

func (p *GetPreviewResp) IsSetData() bool

func (*GetPreviewResp) Read

func (p *GetPreviewResp) Read(iprot thrift.TProtocol) (err error)

func (*GetPreviewResp) ReadField1

func (p *GetPreviewResp) ReadField1(iprot thrift.TProtocol) error

func (*GetPreviewResp) ReadField2

func (p *GetPreviewResp) ReadField2(iprot thrift.TProtocol) error

func (*GetPreviewResp) ReadField3

func (p *GetPreviewResp) ReadField3(iprot thrift.TProtocol) error

func (*GetPreviewResp) String

func (p *GetPreviewResp) String() string

func (*GetPreviewResp) Write

func (p *GetPreviewResp) Write(oprot thrift.TProtocol) (err error)

type PreviewData

type PreviewData struct {
	ID         int64 `thrift:"id,1,required" form:"id,required" json:"id,required"`
	FileCodeID int64 `thrift:"file_code_id,2,required" form:"file_code_id,required" json:"file_code_id,required"`
	// image/video/audio/pdf/text/office
	PreviewType string  `thrift:"preview_type,3,required" form:"preview_type,required" json:"preview_type,required"`
	Thumbnail   *string `thrift:"thumbnail,4,optional" form:"thumbnail" json:"thumbnail,omitempty"`
	PreviewURL  *string `thrift:"preview_url,5,optional" form:"preview_url" json:"preview_url,omitempty"`
	Width       *int32  `thrift:"width,6,optional" form:"width" json:"width,omitempty"`
	Height      *int32  `thrift:"height,7,optional" form:"height" json:"height,omitempty"`
	// 秒
	Duration    *int32  `thrift:"duration,8,optional" form:"duration" json:"duration,omitempty"`
	PageCount   *int32  `thrift:"page_count,9,optional" form:"page_count" json:"page_count,omitempty"`
	TextContent *string `thrift:"text_content,10,optional" form:"text_content" json:"text_content,omitempty"`
	MimeType    *string `thrift:"mime_type,11,optional" form:"mime_type" json:"mime_type,omitempty"`
	FileSize    *int64  `thrift:"file_size,12,optional" form:"file_size" json:"file_size,omitempty"`
}
var GetPreviewResp_Data_DEFAULT *PreviewData

func NewPreviewData

func NewPreviewData() *PreviewData

func (*PreviewData) GetDuration

func (p *PreviewData) GetDuration() (v int32)

func (*PreviewData) GetFileCodeID

func (p *PreviewData) GetFileCodeID() (v int64)

func (*PreviewData) GetFileSize

func (p *PreviewData) GetFileSize() (v int64)

func (*PreviewData) GetHeight

func (p *PreviewData) GetHeight() (v int32)

func (*PreviewData) GetID

func (p *PreviewData) GetID() (v int64)

func (*PreviewData) GetMimeType

func (p *PreviewData) GetMimeType() (v string)

func (*PreviewData) GetPageCount

func (p *PreviewData) GetPageCount() (v int32)

func (*PreviewData) GetPreviewType

func (p *PreviewData) GetPreviewType() (v string)

func (*PreviewData) GetPreviewURL

func (p *PreviewData) GetPreviewURL() (v string)

func (*PreviewData) GetTextContent

func (p *PreviewData) GetTextContent() (v string)

func (*PreviewData) GetThumbnail

func (p *PreviewData) GetThumbnail() (v string)

func (*PreviewData) GetWidth

func (p *PreviewData) GetWidth() (v int32)

func (*PreviewData) InitDefault

func (p *PreviewData) InitDefault()

func (*PreviewData) IsSetDuration

func (p *PreviewData) IsSetDuration() bool

func (*PreviewData) IsSetFileSize

func (p *PreviewData) IsSetFileSize() bool

func (*PreviewData) IsSetHeight

func (p *PreviewData) IsSetHeight() bool

func (*PreviewData) IsSetMimeType

func (p *PreviewData) IsSetMimeType() bool

func (*PreviewData) IsSetPageCount

func (p *PreviewData) IsSetPageCount() bool

func (*PreviewData) IsSetPreviewURL

func (p *PreviewData) IsSetPreviewURL() bool

func (*PreviewData) IsSetTextContent

func (p *PreviewData) IsSetTextContent() bool

func (*PreviewData) IsSetThumbnail

func (p *PreviewData) IsSetThumbnail() bool

func (*PreviewData) IsSetWidth

func (p *PreviewData) IsSetWidth() bool

func (*PreviewData) Read

func (p *PreviewData) Read(iprot thrift.TProtocol) (err error)

func (*PreviewData) ReadField1

func (p *PreviewData) ReadField1(iprot thrift.TProtocol) error

func (*PreviewData) ReadField2

func (p *PreviewData) ReadField2(iprot thrift.TProtocol) error

func (*PreviewData) ReadField3

func (p *PreviewData) ReadField3(iprot thrift.TProtocol) error

func (*PreviewData) ReadField4

func (p *PreviewData) ReadField4(iprot thrift.TProtocol) error

func (*PreviewData) ReadField5

func (p *PreviewData) ReadField5(iprot thrift.TProtocol) error

func (*PreviewData) ReadField6

func (p *PreviewData) ReadField6(iprot thrift.TProtocol) error

func (*PreviewData) ReadField7

func (p *PreviewData) ReadField7(iprot thrift.TProtocol) error

func (*PreviewData) ReadField8

func (p *PreviewData) ReadField8(iprot thrift.TProtocol) error

func (*PreviewData) ReadField9

func (p *PreviewData) ReadField9(iprot thrift.TProtocol) error

func (*PreviewData) ReadField10

func (p *PreviewData) ReadField10(iprot thrift.TProtocol) error

func (*PreviewData) ReadField11

func (p *PreviewData) ReadField11(iprot thrift.TProtocol) error

func (*PreviewData) ReadField12

func (p *PreviewData) ReadField12(iprot thrift.TProtocol) error

func (*PreviewData) String

func (p *PreviewData) String() string

func (*PreviewData) Write

func (p *PreviewData) Write(oprot thrift.TProtocol) (err error)

type PreviewService

type PreviewService interface {
	// GetPreview 获取文件预览信息(受取件闸门/锁定管控,语义同取件)
	GetPreview(ctx context.Context, req *GetPreviewReq) (r *GetPreviewResp, err error)
}

==================== 服务定义 ====================

type PreviewServiceClient

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

func NewPreviewServiceClient

func NewPreviewServiceClient(c thrift.TClient) *PreviewServiceClient

func NewPreviewServiceClientProtocol

func NewPreviewServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *PreviewServiceClient

func (*PreviewServiceClient) Client_

func (p *PreviewServiceClient) Client_() thrift.TClient

func (*PreviewServiceClient) GetPreview

func (p *PreviewServiceClient) GetPreview(ctx context.Context, req *GetPreviewReq) (r *GetPreviewResp, err error)

type PreviewServiceGetPreviewArgs

type PreviewServiceGetPreviewArgs struct {
	Req *GetPreviewReq `thrift:"req,1"`
}

func NewPreviewServiceGetPreviewArgs

func NewPreviewServiceGetPreviewArgs() *PreviewServiceGetPreviewArgs

func (*PreviewServiceGetPreviewArgs) GetReq

func (*PreviewServiceGetPreviewArgs) InitDefault

func (p *PreviewServiceGetPreviewArgs) InitDefault()

func (*PreviewServiceGetPreviewArgs) IsSetReq

func (p *PreviewServiceGetPreviewArgs) IsSetReq() bool

func (*PreviewServiceGetPreviewArgs) Read

func (p *PreviewServiceGetPreviewArgs) Read(iprot thrift.TProtocol) (err error)

func (*PreviewServiceGetPreviewArgs) ReadField1

func (p *PreviewServiceGetPreviewArgs) ReadField1(iprot thrift.TProtocol) error

func (*PreviewServiceGetPreviewArgs) String

func (*PreviewServiceGetPreviewArgs) Write

func (p *PreviewServiceGetPreviewArgs) Write(oprot thrift.TProtocol) (err error)

type PreviewServiceGetPreviewResult

type PreviewServiceGetPreviewResult struct {
	Success *GetPreviewResp `thrift:"success,0,optional"`
}

func NewPreviewServiceGetPreviewResult

func NewPreviewServiceGetPreviewResult() *PreviewServiceGetPreviewResult

func (*PreviewServiceGetPreviewResult) GetSuccess

func (p *PreviewServiceGetPreviewResult) GetSuccess() (v *GetPreviewResp)

func (*PreviewServiceGetPreviewResult) InitDefault

func (p *PreviewServiceGetPreviewResult) InitDefault()

func (*PreviewServiceGetPreviewResult) IsSetSuccess

func (p *PreviewServiceGetPreviewResult) IsSetSuccess() bool

func (*PreviewServiceGetPreviewResult) Read

func (*PreviewServiceGetPreviewResult) ReadField0

func (*PreviewServiceGetPreviewResult) String

func (*PreviewServiceGetPreviewResult) Write

func (p *PreviewServiceGetPreviewResult) Write(oprot thrift.TProtocol) (err error)

type PreviewServiceProcessor

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

func NewPreviewServiceProcessor

func NewPreviewServiceProcessor(handler PreviewService) *PreviewServiceProcessor

func (*PreviewServiceProcessor) AddToProcessorMap

func (p *PreviewServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*PreviewServiceProcessor) GetProcessorFunction

func (p *PreviewServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*PreviewServiceProcessor) Process

func (p *PreviewServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*PreviewServiceProcessor) ProcessorMap

Jump to

Keyboard shortcuts

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