Documentation
¶
Index ¶
Constants ¶
const ( //ContentModeratorSubscriptionKey Azure ContentModerator Subscription env key ContentModeratorSubscriptionKey = "WSS_CONTENTMODERATOR_SUBSCRIPTION_KEY" //ContentModeratorEndpointKey Azure ContentModerator Endpoint env key ContentModeratorEndpointKey = "WSS_CONTENTMODERATOR_ENDPOINT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration structure for the ContentModerator service configuration
func BuildConfigurationFromEnvs ¶
func BuildConfigurationFromEnvs() (*Configuration, error)
BuildConfigurationFromEnvs builds the configuration from env variables
func (*Configuration) IsValid ¶
func (c *Configuration) IsValid() bool
IsValid Checks if the configuration is valid
type ContentModeratorPhotoResult ¶
ContentModeratorPhotoResult result of the ContentModeratorAPI for the evaluation of a photo
type ContentModeratorServiceClient ¶
type ContentModeratorServiceClient struct {
// contains filtered or unexported fields
}
ContentModeratorServiceClient client for the Azure ContentModerator Service
func NewContentModeratorServiceClient ¶
func NewContentModeratorServiceClient(conf *Configuration) *ContentModeratorServiceClient
NewContentModeratorServiceClient ContentModeratorServiceClient constructor
func (*ContentModeratorServiceClient) InvokeContentModeratorPhoto ¶
func (s *ContentModeratorServiceClient) InvokeContentModeratorPhoto(ctx context.Context, photo io.ReadCloser) (*ContentModeratorPhotoResult, error)
InvokeContentModeratorPhoto invokes the ContentModerator APIs with the provided photo
func (*ContentModeratorServiceClient) InvokeContentModeratorText ¶
func (s *ContentModeratorServiceClient) InvokeContentModeratorText(ctx context.Context, message string) (*ContentModeratorTextResult, error)
InvokeContentModeratorText invokes the ContentModerator APIs with the provided message
type ContentModeratorTextResult ¶
type ContentModeratorTextResult struct {
BadWords []string
}
ContentModeratorTextResult result of the ContentModeratorAPI for the evaluation of a message