Documentation ¶
Overview ¶
Package esg provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- Constants
- func NewPostDetectEsgSentimentLanguageRequest(server string, language string, ...) (*http.Request, error)
- func NewPostDetectEsgSentimentLanguageRequestWithBody(server string, language string, contentType string, body io.Reader) (*http.Request, error)
- type AnalysisRequest
- type Category
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) PostDetectEsgSentimentLanguageWithBodyWithResponse(ctx context.Context, language string, contentType string, body io.Reader, ...) (*PostDetectEsgSentimentLanguageResponse, error)
- func (c *ClientWithResponses) PostDetectEsgSentimentLanguageWithResponse(ctx context.Context, language string, ...) (*PostDetectEsgSentimentLanguageResponse, error)
- type ClientWithResponsesInterface
- type Document
- type DocumentPosition
- type ESGSentimentDetectDocument
- type ESGSentimentDetectResponse
- type Extraction
- type HttpRequestDoer
- type PostDetectEsgSentimentLanguageJSONBody
- type PostDetectEsgSentimentLanguageJSONRequestBody
- type PostDetectEsgSentimentLanguageResponse
- type RequestEditorFn
- type ServiceError
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewPostDetectEsgSentimentLanguageRequest ¶
func NewPostDetectEsgSentimentLanguageRequest(server string, language string, body PostDetectEsgSentimentLanguageJSONRequestBody) (*http.Request, error)
NewPostDetectEsgSentimentLanguageRequest calls the generic PostDetectEsgSentimentLanguage builder with application/json body
func NewPostDetectEsgSentimentLanguageRequestWithBody ¶
func NewPostDetectEsgSentimentLanguageRequestWithBody(server string, language string, contentType string, body io.Reader) (*http.Request, error)
NewPostDetectEsgSentimentLanguageRequestWithBody generates requests for PostDetectEsgSentimentLanguage with any type of body
Types ¶
type AnalysisRequest ¶
type AnalysisRequest struct { // Document Document *Document `json:"document,omitempty"` }
Request
type Category ¶
type Category struct { // Score expressed as a percentage of the sum of the scores of all the candidate categories, winners and not (see the **score** property) Frequency *float32 `json:"frequency,omitempty"` // Hierarchical path Hierarchy *[]string `json:"hierarchy,omitempty"` // Category ID Id *string `json:"id,omitempty"` // Category label Label *string `json:"label,omitempty"` // Name of the software package containing the reference taxonomy Namespace *string `json:"namespace,omitempty"` // Positions of the portions of text that contributed to the selection of the category Positions *[]DocumentPosition `json:"positions,omitempty"` // Score assigned to the category to represent its relevance Score *int32 `json:"score,omitempty"` // True if the category is deemed particularly relevant Winner *bool `json:"winner,omitempty"` }
Category
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) PostDetectEsgSentimentLanguage ¶
func (c *Client) PostDetectEsgSentimentLanguage(ctx context.Context, language string, body PostDetectEsgSentimentLanguageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // PostDetectEsgSentimentLanguage request with any body PostDetectEsgSentimentLanguageWithBody(ctx context.Context, language string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostDetectEsgSentimentLanguage(ctx context.Context, language string, body PostDetectEsgSentimentLanguageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) PostDetectEsgSentimentLanguageWithBodyWithResponse ¶
func (c *ClientWithResponses) PostDetectEsgSentimentLanguageWithBodyWithResponse(ctx context.Context, language string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDetectEsgSentimentLanguageResponse, error)
PostDetectEsgSentimentLanguageWithBodyWithResponse request with arbitrary body returning *PostDetectEsgSentimentLanguageResponse
func (*ClientWithResponses) PostDetectEsgSentimentLanguageWithResponse ¶
func (c *ClientWithResponses) PostDetectEsgSentimentLanguageWithResponse(ctx context.Context, language string, body PostDetectEsgSentimentLanguageJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDetectEsgSentimentLanguageResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // PostDetectEsgSentimentLanguage request with any body PostDetectEsgSentimentLanguageWithBodyWithResponse(ctx context.Context, language string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDetectEsgSentimentLanguageResponse, error) PostDetectEsgSentimentLanguageWithResponse(ctx context.Context, language string, body PostDetectEsgSentimentLanguageJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDetectEsgSentimentLanguageResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Document ¶
type Document struct { // The document's text Text *string `json:"text,omitempty"` }
Document
type DocumentPosition ¶
type DocumentPosition struct { // Zero-based position of the character after the last End *int64 `json:"end,omitempty"` // Zero-based position of the first character Start *int64 `json:"start,omitempty"` }
Position
type ESGSentimentDetectDocument ¶
type ESGSentimentDetectDocument struct { // ESG categories with sentiment connotation, for example: 'Environment/Positive/Waste and Emissions Management' or 'Governance/Negative/Legal Compliance'" Categories *[]Category `json:"categories,omitempty"` // Extractions of entities with ESG data and overall ESG sentiment scores. For example: 'entity=Acme Ltd., pollution_reduced=25%' or 'environment_performance_score=365'. Extractions *[]Extraction `json:"extractions,omitempty"` // Text language Language *string `json:"language,omitempty"` // Service version Version *string `json:"version,omitempty"` }
Information detection data
type ESGSentimentDetectResponse ¶
type ESGSentimentDetectResponse struct { // Information detection data Data *ESGSentimentDetectDocument `json:"data,omitempty"` // Service errors Errors *[]ServiceError `json:"errors,omitempty"` // Operation completed successfully (true/false) Success *bool `json:"success,omitempty"` }
ESG Sentiment detection resource response
type Extraction ¶
type Extraction struct { // Extraction record fields Fields *[]struct { // Field name Name *string `json:"name,omitempty"` // Positions of parts of the text corresponding to the field value Positions *[]DocumentPosition `json:"positions,omitempty"` // Field value Value *string `json:"value,omitempty"` } `json:"fields,omitempty"` // Software package name Namespace *string `json:"namespace,omitempty"` // Extraction record template Template *string `json:"template,omitempty"` }
Extraction record
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PostDetectEsgSentimentLanguageJSONBody ¶
type PostDetectEsgSentimentLanguageJSONBody = AnalysisRequest
PostDetectEsgSentimentLanguageJSONBody defines parameters for PostDetectEsgSentimentLanguage.
type PostDetectEsgSentimentLanguageJSONRequestBody ¶
type PostDetectEsgSentimentLanguageJSONRequestBody = PostDetectEsgSentimentLanguageJSONBody
PostDetectEsgSentimentLanguageJSONRequestBody defines body for PostDetectEsgSentimentLanguage for application/json ContentType.
type PostDetectEsgSentimentLanguageResponse ¶
type PostDetectEsgSentimentLanguageResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ESGSentimentDetectResponse }
func ParsePostDetectEsgSentimentLanguageResponse ¶
func ParsePostDetectEsgSentimentLanguageResponse(rsp *http.Response) (*PostDetectEsgSentimentLanguageResponse, error)
ParsePostDetectEsgSentimentLanguageResponse parses an HTTP response from a PostDetectEsgSentimentLanguageWithResponse call
func (PostDetectEsgSentimentLanguageResponse) Status ¶
func (r PostDetectEsgSentimentLanguageResponse) Status() string
Status returns HTTPResponse.Status
func (PostDetectEsgSentimentLanguageResponse) StatusCode ¶
func (r PostDetectEsgSentimentLanguageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServiceError ¶
type ServiceError struct { // Error code Code *string `json:"code,omitempty"` // Error message Message *string `json:"message,omitempty"` }
Error information