Documentation
¶
Overview ¶
Package insightiface provides an interface to enable mocking the INSIGHT service client for testing your code.
It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.
Index ¶
- Constants
- type INSIGHT
- func (c *INSIGHT) PullPost(input *PullPostInput) (*PullPostOutput, error)
- func (c *INSIGHT) PullPostCommon(input *map[string]interface{}) (*map[string]interface{}, error)
- func (c *INSIGHT) PullPostCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
- func (c *INSIGHT) PullPostCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
- func (c *INSIGHT) PullPostRequest(input *PullPostInput) (req *request.Request, output *PullPostOutput)
- func (c *INSIGHT) PullPostWithContext(ctx volcengine.Context, input *PullPostInput, opts ...request.Option) (*PullPostOutput, error)
- type INSIGHTAPI
- type ItemDocForPullPostOutput
- func (s ItemDocForPullPostOutput) GoString() string
- func (s *ItemDocForPullPostOutput) SetAsr(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetContent(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetDedupID(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetEmotion(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetFansCount(v int32) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetIsFollow(v bool) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetLocations(v []*LocationForPullPostOutput) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetMainDomain(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetMediaName(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetOcr(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetOcrHigh(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetPostID(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetPublishTime(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetReason(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetRiskType(v []*string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetSummary(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetTitle(v string) *ItemDocForPullPostOutput
- func (s *ItemDocForPullPostOutput) SetUrl(v string) *ItemDocForPullPostOutput
- func (s ItemDocForPullPostOutput) String() string
- type LocationForPullPostOutput
- func (s LocationForPullPostOutput) GoString() string
- func (s *LocationForPullPostOutput) SetCity(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetCityCode(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetDistrict(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetDistrictCode(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetLocation(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetName(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetProvince(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetRegion(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetRegionCode(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetTown(v string) *LocationForPullPostOutput
- func (s *LocationForPullPostOutput) SetTownCode(v string) *LocationForPullPostOutput
- func (s LocationForPullPostOutput) String() string
- type PullPostInput
- func (s PullPostInput) GoString() string
- func (s *PullPostInput) SetEndTime(v string) *PullPostInput
- func (s *PullPostInput) SetPageToken(v string) *PullPostInput
- func (s *PullPostInput) SetSize(v int32) *PullPostInput
- func (s *PullPostInput) SetStartTime(v string) *PullPostInput
- func (s *PullPostInput) SetTaskID(v int32) *PullPostInput
- func (s PullPostInput) String() string
- func (s *PullPostInput) Validate() error
- type PullPostOutput
Constants ¶
const ( ServiceName = "insight" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "insight" // ServiceID is a unique identifer of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INSIGHT ¶
INSIGHT provides the API operation methods for making requests to INSIGHT. See this package's package overview docs for details on the service.
INSIGHT methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*volcengine.Config) *INSIGHT
New create int can support ssl or region locate set
func (*INSIGHT) PullPost ¶
func (c *INSIGHT) PullPost(input *PullPostInput) (*PullPostOutput, error)
PullPost API operation for INSIGHT.
Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.
See the VOLCENGINE API reference guide for INSIGHT's API operation PullPost for usage and error information.
func (*INSIGHT) PullPostCommon ¶
PullPostCommon API operation for INSIGHT.
Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.
See the VOLCENGINE API reference guide for INSIGHT's API operation PullPostCommon for usage and error information.
func (*INSIGHT) PullPostCommonRequest ¶
func (c *INSIGHT) PullPostCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
PullPostCommonRequest generates a "volcengine/request.Request" representing the client's request for the PullPostCommon operation. The "output" return value will be populated with the PullPostCommon request's response once the request completes successfully.
Use "Send" method on the returned PullPostCommon Request to send the API call to the service. the "output" return value is not valid until after PullPostCommon Send returns without error.
See PullPostCommon for more information on using the PullPostCommon API call, and error handling.
// Example sending a request using the PullPostCommonRequest method.
req, resp := client.PullPostCommonRequest(params)
err := req.Send()
if err == nil { // resp is now filled
fmt.Println(resp)
}
func (*INSIGHT) PullPostCommonWithContext ¶
func (c *INSIGHT) PullPostCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
PullPostCommonWithContext is the same as PullPostCommon with the addition of the ability to pass a context and additional request options.
See PullPostCommon for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*INSIGHT) PullPostRequest ¶
func (c *INSIGHT) PullPostRequest(input *PullPostInput) (req *request.Request, output *PullPostOutput)
PullPostRequest generates a "volcengine/request.Request" representing the client's request for the PullPost operation. The "output" return value will be populated with the PullPostCommon request's response once the request completes successfully.
Use "Send" method on the returned PullPostCommon Request to send the API call to the service. the "output" return value is not valid until after PullPostCommon Send returns without error.
See PullPost for more information on using the PullPost API call, and error handling.
// Example sending a request using the PullPostRequest method.
req, resp := client.PullPostRequest(params)
err := req.Send()
if err == nil { // resp is now filled
fmt.Println(resp)
}
func (*INSIGHT) PullPostWithContext ¶
func (c *INSIGHT) PullPostWithContext(ctx volcengine.Context, input *PullPostInput, opts ...request.Option) (*PullPostOutput, error)
PullPostWithContext is the same as PullPost with the addition of the ability to pass a context and additional request options.
See PullPost for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type INSIGHTAPI ¶
type INSIGHTAPI interface {
PullPostCommon(*map[string]interface{}) (*map[string]interface{}, error)
PullPostCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
PullPostCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})
PullPost(*PullPostInput) (*PullPostOutput, error)
PullPostWithContext(volcengine.Context, *PullPostInput, ...request.Option) (*PullPostOutput, error)
PullPostRequest(*PullPostInput) (*request.Request, *PullPostOutput)
}
INSIGHTAPI provides an interface to enable mocking the insight.INSIGHT service client's API operation,
// volcengine sdk func uses an SDK service client to make a request to
// INSIGHT.
func myFunc(svc INSIGHTAPI) bool {
// Make svc.PullPost request
}
func main() {
sess := session.New()
svc := insight.New(sess)
myFunc(svc)
}
type ItemDocForPullPostOutput ¶
type ItemDocForPullPostOutput struct {
Asr *string `type:"string" json:",omitempty"`
Content *string `type:"string" json:",omitempty"`
DedupID *string `type:"string" json:",omitempty"`
Emotion *string `type:"string" json:",omitempty"`
FansCount *int32 `type:"int32" json:",omitempty"`
IsFollow *bool `type:"boolean" json:",omitempty"`
Locations []*LocationForPullPostOutput `type:"list" json:"locations,omitempty"`
MainDomain *string `type:"string" json:",omitempty"`
MediaName *string `type:"string" json:",omitempty"`
Ocr *string `type:"string" json:",omitempty"`
OcrHigh *string `type:"string" json:",omitempty"`
PostID *string `type:"string" json:",omitempty"`
PublishTime *string `type:"string" json:",omitempty"`
Reason *string `type:"string" json:",omitempty"`
RiskType []*string `type:"list" json:",omitempty"`
Summary *string `type:"string" json:",omitempty"`
Title *string `type:"string" json:",omitempty"`
Url *string `type:"string" json:",omitempty"`
// contains filtered or unexported fields
}
func (ItemDocForPullPostOutput) GoString ¶
func (s ItemDocForPullPostOutput) GoString() string
GoString returns the string representation
func (*ItemDocForPullPostOutput) SetAsr ¶
func (s *ItemDocForPullPostOutput) SetAsr(v string) *ItemDocForPullPostOutput
SetAsr sets the Asr field's value.
func (*ItemDocForPullPostOutput) SetContent ¶
func (s *ItemDocForPullPostOutput) SetContent(v string) *ItemDocForPullPostOutput
SetContent sets the Content field's value.
func (*ItemDocForPullPostOutput) SetDedupID ¶
func (s *ItemDocForPullPostOutput) SetDedupID(v string) *ItemDocForPullPostOutput
SetDedupID sets the DedupID field's value.
func (*ItemDocForPullPostOutput) SetEmotion ¶
func (s *ItemDocForPullPostOutput) SetEmotion(v string) *ItemDocForPullPostOutput
SetEmotion sets the Emotion field's value.
func (*ItemDocForPullPostOutput) SetFansCount ¶
func (s *ItemDocForPullPostOutput) SetFansCount(v int32) *ItemDocForPullPostOutput
SetFansCount sets the FansCount field's value.
func (*ItemDocForPullPostOutput) SetIsFollow ¶
func (s *ItemDocForPullPostOutput) SetIsFollow(v bool) *ItemDocForPullPostOutput
SetIsFollow sets the IsFollow field's value.
func (*ItemDocForPullPostOutput) SetLocations ¶
func (s *ItemDocForPullPostOutput) SetLocations(v []*LocationForPullPostOutput) *ItemDocForPullPostOutput
SetLocations sets the Locations field's value.
func (*ItemDocForPullPostOutput) SetMainDomain ¶
func (s *ItemDocForPullPostOutput) SetMainDomain(v string) *ItemDocForPullPostOutput
SetMainDomain sets the MainDomain field's value.
func (*ItemDocForPullPostOutput) SetMediaName ¶
func (s *ItemDocForPullPostOutput) SetMediaName(v string) *ItemDocForPullPostOutput
SetMediaName sets the MediaName field's value.
func (*ItemDocForPullPostOutput) SetOcr ¶
func (s *ItemDocForPullPostOutput) SetOcr(v string) *ItemDocForPullPostOutput
SetOcr sets the Ocr field's value.
func (*ItemDocForPullPostOutput) SetOcrHigh ¶
func (s *ItemDocForPullPostOutput) SetOcrHigh(v string) *ItemDocForPullPostOutput
SetOcrHigh sets the OcrHigh field's value.
func (*ItemDocForPullPostOutput) SetPostID ¶
func (s *ItemDocForPullPostOutput) SetPostID(v string) *ItemDocForPullPostOutput
SetPostID sets the PostID field's value.
func (*ItemDocForPullPostOutput) SetPublishTime ¶
func (s *ItemDocForPullPostOutput) SetPublishTime(v string) *ItemDocForPullPostOutput
SetPublishTime sets the PublishTime field's value.
func (*ItemDocForPullPostOutput) SetReason ¶
func (s *ItemDocForPullPostOutput) SetReason(v string) *ItemDocForPullPostOutput
SetReason sets the Reason field's value.
func (*ItemDocForPullPostOutput) SetRiskType ¶
func (s *ItemDocForPullPostOutput) SetRiskType(v []*string) *ItemDocForPullPostOutput
SetRiskType sets the RiskType field's value.
func (*ItemDocForPullPostOutput) SetSummary ¶
func (s *ItemDocForPullPostOutput) SetSummary(v string) *ItemDocForPullPostOutput
SetSummary sets the Summary field's value.
func (*ItemDocForPullPostOutput) SetTitle ¶
func (s *ItemDocForPullPostOutput) SetTitle(v string) *ItemDocForPullPostOutput
SetTitle sets the Title field's value.
func (*ItemDocForPullPostOutput) SetUrl ¶
func (s *ItemDocForPullPostOutput) SetUrl(v string) *ItemDocForPullPostOutput
SetUrl sets the Url field's value.
func (ItemDocForPullPostOutput) String ¶
func (s ItemDocForPullPostOutput) String() string
String returns the string representation
type LocationForPullPostOutput ¶
type LocationForPullPostOutput struct {
City *string `type:"string" json:",omitempty"`
CityCode *string `type:"string" json:",omitempty"`
District *string `type:"string" json:",omitempty"`
DistrictCode *string `type:"string" json:",omitempty"`
Location *string `type:"string" json:",omitempty"`
Name *string `type:"string" json:",omitempty"`
Province *string `type:"string" json:",omitempty"`
Region *string `type:"string" json:",omitempty"`
RegionCode *string `type:"string" json:",omitempty"`
Town *string `type:"string" json:",omitempty"`
TownCode *string `type:"string" json:",omitempty"`
// contains filtered or unexported fields
}
func (LocationForPullPostOutput) GoString ¶
func (s LocationForPullPostOutput) GoString() string
GoString returns the string representation
func (*LocationForPullPostOutput) SetCity ¶
func (s *LocationForPullPostOutput) SetCity(v string) *LocationForPullPostOutput
SetCity sets the City field's value.
func (*LocationForPullPostOutput) SetCityCode ¶
func (s *LocationForPullPostOutput) SetCityCode(v string) *LocationForPullPostOutput
SetCityCode sets the CityCode field's value.
func (*LocationForPullPostOutput) SetDistrict ¶
func (s *LocationForPullPostOutput) SetDistrict(v string) *LocationForPullPostOutput
SetDistrict sets the District field's value.
func (*LocationForPullPostOutput) SetDistrictCode ¶
func (s *LocationForPullPostOutput) SetDistrictCode(v string) *LocationForPullPostOutput
SetDistrictCode sets the DistrictCode field's value.
func (*LocationForPullPostOutput) SetLocation ¶
func (s *LocationForPullPostOutput) SetLocation(v string) *LocationForPullPostOutput
SetLocation sets the Location field's value.
func (*LocationForPullPostOutput) SetName ¶
func (s *LocationForPullPostOutput) SetName(v string) *LocationForPullPostOutput
SetName sets the Name field's value.
func (*LocationForPullPostOutput) SetProvince ¶
func (s *LocationForPullPostOutput) SetProvince(v string) *LocationForPullPostOutput
SetProvince sets the Province field's value.
func (*LocationForPullPostOutput) SetRegion ¶
func (s *LocationForPullPostOutput) SetRegion(v string) *LocationForPullPostOutput
SetRegion sets the Region field's value.
func (*LocationForPullPostOutput) SetRegionCode ¶
func (s *LocationForPullPostOutput) SetRegionCode(v string) *LocationForPullPostOutput
SetRegionCode sets the RegionCode field's value.
func (*LocationForPullPostOutput) SetTown ¶
func (s *LocationForPullPostOutput) SetTown(v string) *LocationForPullPostOutput
SetTown sets the Town field's value.
func (*LocationForPullPostOutput) SetTownCode ¶
func (s *LocationForPullPostOutput) SetTownCode(v string) *LocationForPullPostOutput
SetTownCode sets the TownCode field's value.
func (LocationForPullPostOutput) String ¶
func (s LocationForPullPostOutput) String() string
String returns the string representation
type PullPostInput ¶
type PullPostInput struct {
EndTime *string `type:"string" json:",omitempty"`
PageToken *string `type:"string" json:",omitempty"`
Size *int32 `type:"int32" json:",omitempty"`
StartTime *string `type:"string" json:",omitempty"`
// TaskID is a required field
TaskID *int32 `type:"int32" json:",omitempty" required:"true"`
// contains filtered or unexported fields
}
func (PullPostInput) GoString ¶
func (s PullPostInput) GoString() string
GoString returns the string representation
func (*PullPostInput) SetEndTime ¶
func (s *PullPostInput) SetEndTime(v string) *PullPostInput
SetEndTime sets the EndTime field's value.
func (*PullPostInput) SetPageToken ¶
func (s *PullPostInput) SetPageToken(v string) *PullPostInput
SetPageToken sets the PageToken field's value.
func (*PullPostInput) SetSize ¶
func (s *PullPostInput) SetSize(v int32) *PullPostInput
SetSize sets the Size field's value.
func (*PullPostInput) SetStartTime ¶
func (s *PullPostInput) SetStartTime(v string) *PullPostInput
SetStartTime sets the StartTime field's value.
func (*PullPostInput) SetTaskID ¶
func (s *PullPostInput) SetTaskID(v int32) *PullPostInput
SetTaskID sets the TaskID field's value.
func (PullPostInput) String ¶
func (s PullPostInput) String() string
String returns the string representation
func (*PullPostInput) Validate ¶
func (s *PullPostInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type PullPostOutput ¶
type PullPostOutput struct {
Metadata *response.ResponseMetadata
HasMore *bool `type:"boolean" json:",omitempty"`
ItemDocs []*ItemDocForPullPostOutput `type:"list" json:",omitempty"`
NextPageToken *string `type:"string" json:",omitempty"`
// contains filtered or unexported fields
}
func (PullPostOutput) GoString ¶
func (s PullPostOutput) GoString() string
GoString returns the string representation
func (*PullPostOutput) SetHasMore ¶
func (s *PullPostOutput) SetHasMore(v bool) *PullPostOutput
SetHasMore sets the HasMore field's value.
func (*PullPostOutput) SetItemDocs ¶
func (s *PullPostOutput) SetItemDocs(v []*ItemDocForPullPostOutput) *PullPostOutput
SetItemDocs sets the ItemDocs field's value.
func (*PullPostOutput) SetNextPageToken ¶
func (s *PullPostOutput) SetNextPageToken(v string) *PullPostOutput
SetNextPageToken sets the NextPageToken field's value.
func (PullPostOutput) String ¶
func (s PullPostOutput) String() string
String returns the string representation