Documentation
¶
Index ¶
- Constants
- Variables
- func IsNil(i interface{}) bool
- func PtrBool(v bool) *bool
- func PtrFloat32(v float32) *float32
- func PtrFloat64(v float64) *float64
- func PtrInt(v int) *int
- func PtrInt32(v int32) *int32
- func PtrInt64(v int64) *int64
- func PtrString(v string) *string
- func PtrTime(v time.Time) *time.Time
- type APIClient
- type APIKey
- type ApiError
- type ApiErrorResponse
- type BarcodeImageFormat
- type BarcodeImageParams
- type BarcodeResponse
- type BarcodeResponseList
- type BasicAuth
- type CodeLocation
- type Configuration
- type DecodeBarcodeType
- type EncodeBarcodeType
- type EncodeData
- type EncodeDataType
- type GenerateAPIGenerateMultipartOpts
- type GenerateAPIGenerateOpts
- type GenerateAPIService
- func (a *GenerateAPIService) Generate(ctx context.Context, barcodeType EncodeBarcodeType, data string, ...) ([]byte, *http.Response, error)
- func (a *GenerateAPIService) GenerateBody(ctx context.Context, generateParams GenerateParams) ([]byte, *http.Response, error)
- func (a *GenerateAPIService) GenerateMultipart(ctx context.Context, barcodeType EncodeBarcodeType, data string, ...) ([]byte, *http.Response, error)
- type GenerateParams
- type GenericAPIError
- type GraphicsUnit
- type MappedNullable
- type NullableBool
- type NullableFloat32
- type NullableFloat64
- type NullableInt
- type NullableInt32
- type NullableInt64
- type NullableString
- type NullableTime
- type RecognitionImageKind
- type RecognitionMode
- type RecognizeAPIRecognizeMultipartOpts
- type RecognizeAPIRecognizeOpts
- type RecognizeAPIService
- func (a *RecognizeAPIService) Recognize(ctx context.Context, barcodeType DecodeBarcodeType, fileUrl string, ...) (BarcodeResponseList, *http.Response, error)
- func (a *RecognizeAPIService) RecognizeBase64(ctx context.Context, recognizeBase64Request RecognizeBase64Request) (BarcodeResponseList, *http.Response, error)
- func (a *RecognizeAPIService) RecognizeMultipart(ctx context.Context, barcodeType DecodeBarcodeType, file *os.File, ...) (BarcodeResponseList, *http.Response, error)
- type RecognizeBase64Request
- type RegionPoint
- type ScanAPIService
- func (a *ScanAPIService) Scan(ctx context.Context, fileUrl string) (BarcodeResponseList, *http.Response, error)
- func (a *ScanAPIService) ScanBase64(ctx context.Context, scanBase64Request ScanBase64Request) (BarcodeResponseList, *http.Response, error)
- func (a *ScanAPIService) ScanMultipart(ctx context.Context, file *os.File) (BarcodeResponseList, *http.Response, error)
- type ScanBase64Request
Constants ¶
const ( PACKAGE_VERSION = "4.2605.0" PACKAGE_NAME = "go sdk" X_ASPOSE_CLIENT = "x-aspose-client" X_ASPOSE_CLIENT_VERSION = "x-aspose-client-version" )
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextJWT takes ClientID and ClientSecret to fetch JWT as authentication for the request ContextJWT = contextKey("jwt") )
Functions ¶
func PtrFloat32 ¶
PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat64 ¶
PtrFloat64 is a helper routine that returns a pointer to given float value.
Types ¶
type APIClient ¶
type APIClient struct {
GenerateAPI *GenerateAPIService
RecognizeAPI *RecognizeAPIService
ScanAPI *ScanAPIService
// contains filtered or unexported fields
}
APIClient manages communication with the Aspose.BarCode.Cloud v4.0 specification API v4.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type ApiError ¶
type ApiError struct {
// Gets or sets api error code.
Code string `json:"code"`
// Gets or sets error message.
Message string `json:"message"`
// Gets or sets error description.
Description string `json:"description,omitempty"`
// Gets or sets server datetime.
DateTime time.Time `json:"dateTime,omitempty"`
InnerError *ApiError `json:"innerError,omitempty"`
}
ApiError - Api Error.
type ApiErrorResponse ¶
type ApiErrorResponse struct {
// Gets or sets request Id.
RequestId string `json:"requestId"`
Error ApiError `json:"error"`
}
ApiErrorResponse - ApiError Response
type BarcodeImageFormat ¶
type BarcodeImageFormat string
BarcodeImageFormat : Specifies the file format of the image.
const ( BarcodeImageFormatPng BarcodeImageFormat = "Png" BarcodeImageFormatJpeg BarcodeImageFormat = "Jpeg" BarcodeImageFormatSvg BarcodeImageFormat = "Svg" BarcodeImageFormatTiff BarcodeImageFormat = "Tiff" BarcodeImageFormatGif BarcodeImageFormat = "Gif" )
List of BarcodeImageFormat
type BarcodeImageParams ¶
type BarcodeImageParams struct {
ImageFormat BarcodeImageFormat `json:"imageFormat,omitempty"`
TextLocation CodeLocation `json:"textLocation,omitempty"`
// Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black.
ForegroundColor string `json:"foregroundColor,omitempty"`
// Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White.
BackgroundColor string `json:"backgroundColor,omitempty"`
Units GraphicsUnit `json:"units,omitempty"`
// Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot.
Resolution float32 `json:"resolution,omitempty"`
// Height of the barcode image in given units. Default units: pixel. Decimal separator is dot.
ImageHeight float32 `json:"imageHeight,omitempty"`
// Width of the barcode image in given units. Default units: pixel. Decimal separator is dot.
ImageWidth float32 `json:"imageWidth,omitempty"`
// BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.
RotationAngle int32 `json:"rotationAngle,omitempty"`
}
BarcodeImageParams - Barcode image optional parameters
type BarcodeResponse ¶
type BarcodeResponse struct {
// Barcode data.
BarcodeValue string `json:"barcodeValue,omitempty"`
// Type of the barcode.
Type string `json:"type,omitempty"`
// Region with barcode.
Region []RegionPoint `json:"region,omitempty"`
// Checksum of barcode.
Checksum string `json:"checksum,omitempty"`
}
BarcodeResponse - Represents information about barcode.
type BarcodeResponseList ¶
type BarcodeResponseList struct {
// List of barcodes which are present in image.
Barcodes []BarcodeResponse `json:"barcodes"`
}
BarcodeResponseList - Represents information about barcode list.
type BasicAuth ¶
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type CodeLocation ¶
type CodeLocation string
const ( CodeLocationBelow CodeLocation = "Below" CodeLocationAbove CodeLocation = "Above" CodeLocationNone CodeLocation = "None" )
List of CodeLocation
type Configuration ¶
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client `json:"-"`
}
Configuration - API configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader allow to add custom header
type DecodeBarcodeType ¶
type DecodeBarcodeType string
DecodeBarcodeType : See Aspose.BarCode.BarCodeRecognition.DecodeType
const ( DecodeBarcodeTypeMostCommonlyUsed DecodeBarcodeType = "MostCommonlyUsed" DecodeBarcodeTypeQR DecodeBarcodeType = "QR" DecodeBarcodeTypeAustraliaPost DecodeBarcodeType = "AustraliaPost" DecodeBarcodeTypeAustralianPosteParcel DecodeBarcodeType = "AustralianPosteParcel" DecodeBarcodeTypeAztec DecodeBarcodeType = "Aztec" DecodeBarcodeTypeCodabar DecodeBarcodeType = "Codabar" DecodeBarcodeTypeCodablockF DecodeBarcodeType = "CodablockF" DecodeBarcodeTypeCode11 DecodeBarcodeType = "Code11" DecodeBarcodeTypeCode128 DecodeBarcodeType = "Code128" DecodeBarcodeTypeCode16K DecodeBarcodeType = "Code16K" DecodeBarcodeTypeCode32 DecodeBarcodeType = "Code32" DecodeBarcodeTypeCode39 DecodeBarcodeType = "Code39" DecodeBarcodeTypeCode39FullASCII DecodeBarcodeType = "Code39FullASCII" DecodeBarcodeTypeCode93 DecodeBarcodeType = "Code93" DecodeBarcodeTypeCompactPdf417 DecodeBarcodeType = "CompactPdf417" DecodeBarcodeTypeDataLogic2of5 DecodeBarcodeType = "DataLogic2of5" DecodeBarcodeTypeDataMatrix DecodeBarcodeType = "DataMatrix" DecodeBarcodeTypeDatabarExpanded DecodeBarcodeType = "DatabarExpanded" DecodeBarcodeTypeDatabarExpandedStacked DecodeBarcodeType = "DatabarExpandedStacked" DecodeBarcodeTypeDatabarLimited DecodeBarcodeType = "DatabarLimited" DecodeBarcodeTypeDatabarOmniDirectional DecodeBarcodeType = "DatabarOmniDirectional" DecodeBarcodeTypeDatabarStacked DecodeBarcodeType = "DatabarStacked" DecodeBarcodeTypeDatabarStackedOmniDirectional DecodeBarcodeType = "DatabarStackedOmniDirectional" DecodeBarcodeTypeDatabarTruncated DecodeBarcodeType = "DatabarTruncated" DecodeBarcodeTypeDeutschePostIdentcode DecodeBarcodeType = "DeutschePostIdentcode" DecodeBarcodeTypeDeutschePostLeitcode DecodeBarcodeType = "DeutschePostLeitcode" DecodeBarcodeTypeDotCode DecodeBarcodeType = "DotCode" DecodeBarcodeTypeDutchKIX DecodeBarcodeType = "DutchKIX" DecodeBarcodeTypeEAN13 DecodeBarcodeType = "EAN13" DecodeBarcodeTypeEAN14 DecodeBarcodeType = "EAN14" DecodeBarcodeTypeEAN8 DecodeBarcodeType = "EAN8" DecodeBarcodeTypeGS1Aztec DecodeBarcodeType = "GS1Aztec" DecodeBarcodeTypeGS1Code128 DecodeBarcodeType = "GS1Code128" DecodeBarcodeTypeGS1CompositeBar DecodeBarcodeType = "GS1CompositeBar" DecodeBarcodeTypeGS1DataMatrix DecodeBarcodeType = "GS1DataMatrix" DecodeBarcodeTypeGS1DotCode DecodeBarcodeType = "GS1DotCode" DecodeBarcodeTypeGS1HanXin DecodeBarcodeType = "GS1HanXin" DecodeBarcodeTypeGS1MicroPdf417 DecodeBarcodeType = "GS1MicroPdf417" DecodeBarcodeTypeGS1QR DecodeBarcodeType = "GS1QR" DecodeBarcodeTypeHanXin DecodeBarcodeType = "HanXin" DecodeBarcodeTypeHIBCAztecLIC DecodeBarcodeType = "HIBCAztecLIC" DecodeBarcodeTypeHIBCAztecPAS DecodeBarcodeType = "HIBCAztecPAS" DecodeBarcodeTypeHIBCCode128LIC DecodeBarcodeType = "HIBCCode128LIC" DecodeBarcodeTypeHIBCCode128PAS DecodeBarcodeType = "HIBCCode128PAS" DecodeBarcodeTypeHIBCCode39LIC DecodeBarcodeType = "HIBCCode39LIC" DecodeBarcodeTypeHIBCCode39PAS DecodeBarcodeType = "HIBCCode39PAS" DecodeBarcodeTypeHIBCDataMatrixLIC DecodeBarcodeType = "HIBCDataMatrixLIC" DecodeBarcodeTypeHIBCDataMatrixPAS DecodeBarcodeType = "HIBCDataMatrixPAS" DecodeBarcodeTypeHIBCQRLIC DecodeBarcodeType = "HIBCQRLIC" DecodeBarcodeTypeHIBCQRPAS DecodeBarcodeType = "HIBCQRPAS" DecodeBarcodeTypeIATA2of5 DecodeBarcodeType = "IATA2of5" DecodeBarcodeTypeISBN DecodeBarcodeType = "ISBN" DecodeBarcodeTypeISMN DecodeBarcodeType = "ISMN" DecodeBarcodeTypeISSN DecodeBarcodeType = "ISSN" DecodeBarcodeTypeITF14 DecodeBarcodeType = "ITF14" DecodeBarcodeTypeITF6 DecodeBarcodeType = "ITF6" DecodeBarcodeTypeInterleaved2of5 DecodeBarcodeType = "Interleaved2of5" DecodeBarcodeTypeItalianPost25 DecodeBarcodeType = "ItalianPost25" DecodeBarcodeTypeMacroPdf417 DecodeBarcodeType = "MacroPdf417" DecodeBarcodeTypeMailmark DecodeBarcodeType = "Mailmark" DecodeBarcodeTypeMatrix2of5 DecodeBarcodeType = "Matrix2of5" DecodeBarcodeTypeMaxiCode DecodeBarcodeType = "MaxiCode" DecodeBarcodeTypeMicrE13B DecodeBarcodeType = "MicrE13B" DecodeBarcodeTypeMicroPdf417 DecodeBarcodeType = "MicroPdf417" DecodeBarcodeTypeMicroQR DecodeBarcodeType = "MicroQR" DecodeBarcodeTypeMSI DecodeBarcodeType = "MSI" DecodeBarcodeTypeOneCode DecodeBarcodeType = "OneCode" DecodeBarcodeTypeOPC DecodeBarcodeType = "OPC" DecodeBarcodeTypePatchCode DecodeBarcodeType = "PatchCode" DecodeBarcodeTypePdf417 DecodeBarcodeType = "Pdf417" DecodeBarcodeTypePharmacode DecodeBarcodeType = "Pharmacode" DecodeBarcodeTypePlanet DecodeBarcodeType = "Planet" DecodeBarcodeTypePostnet DecodeBarcodeType = "Postnet" DecodeBarcodeTypePZN DecodeBarcodeType = "PZN" DecodeBarcodeTypeRectMicroQR DecodeBarcodeType = "RectMicroQR" DecodeBarcodeTypeRM4SCC DecodeBarcodeType = "RM4SCC" DecodeBarcodeTypeSCC14 DecodeBarcodeType = "SCC14" DecodeBarcodeTypeSSCC18 DecodeBarcodeType = "SSCC18" DecodeBarcodeTypeStandard2of5 DecodeBarcodeType = "Standard2of5" DecodeBarcodeTypeSupplement DecodeBarcodeType = "Supplement" DecodeBarcodeTypeSwissPostParcel DecodeBarcodeType = "SwissPostParcel" DecodeBarcodeTypeUPCA DecodeBarcodeType = "UPCA" DecodeBarcodeTypeUPCE DecodeBarcodeType = "UPCE" DecodeBarcodeTypeVIN DecodeBarcodeType = "VIN" )
List of DecodeBarcodeType
type EncodeBarcodeType ¶
type EncodeBarcodeType string
EncodeBarcodeType : See Aspose.BarCode.Generation.EncodeTypes
const ( EncodeBarcodeTypeQR EncodeBarcodeType = "QR" EncodeBarcodeTypeAustraliaPost EncodeBarcodeType = "AustraliaPost" EncodeBarcodeTypeAustralianPosteParcel EncodeBarcodeType = "AustralianPosteParcel" EncodeBarcodeTypeAztec EncodeBarcodeType = "Aztec" EncodeBarcodeTypeCodabar EncodeBarcodeType = "Codabar" EncodeBarcodeTypeCodablockF EncodeBarcodeType = "CodablockF" EncodeBarcodeTypeCode11 EncodeBarcodeType = "Code11" EncodeBarcodeTypeCode128 EncodeBarcodeType = "Code128" EncodeBarcodeTypeCode16K EncodeBarcodeType = "Code16K" EncodeBarcodeTypeCode32 EncodeBarcodeType = "Code32" EncodeBarcodeTypeCode39 EncodeBarcodeType = "Code39" EncodeBarcodeTypeCode39FullASCII EncodeBarcodeType = "Code39FullASCII" EncodeBarcodeTypeCode93 EncodeBarcodeType = "Code93" EncodeBarcodeTypeDataLogic2of5 EncodeBarcodeType = "DataLogic2of5" EncodeBarcodeTypeDataMatrix EncodeBarcodeType = "DataMatrix" EncodeBarcodeTypeDatabarExpanded EncodeBarcodeType = "DatabarExpanded" EncodeBarcodeTypeDatabarExpandedStacked EncodeBarcodeType = "DatabarExpandedStacked" EncodeBarcodeTypeDatabarLimited EncodeBarcodeType = "DatabarLimited" EncodeBarcodeTypeDatabarOmniDirectional EncodeBarcodeType = "DatabarOmniDirectional" EncodeBarcodeTypeDatabarStacked EncodeBarcodeType = "DatabarStacked" EncodeBarcodeTypeDatabarStackedOmniDirectional EncodeBarcodeType = "DatabarStackedOmniDirectional" EncodeBarcodeTypeDatabarTruncated EncodeBarcodeType = "DatabarTruncated" EncodeBarcodeTypeDeutschePostIdentcode EncodeBarcodeType = "DeutschePostIdentcode" EncodeBarcodeTypeDeutschePostLeitcode EncodeBarcodeType = "DeutschePostLeitcode" EncodeBarcodeTypeDotCode EncodeBarcodeType = "DotCode" EncodeBarcodeTypeDutchKIX EncodeBarcodeType = "DutchKIX" EncodeBarcodeTypeEAN13 EncodeBarcodeType = "EAN13" EncodeBarcodeTypeEAN14 EncodeBarcodeType = "EAN14" EncodeBarcodeTypeEAN8 EncodeBarcodeType = "EAN8" EncodeBarcodeTypeGS1Aztec EncodeBarcodeType = "GS1Aztec" EncodeBarcodeTypeGS1CodablockF EncodeBarcodeType = "GS1CodablockF" EncodeBarcodeTypeGS1Code128 EncodeBarcodeType = "GS1Code128" EncodeBarcodeTypeGS1DataMatrix EncodeBarcodeType = "GS1DataMatrix" EncodeBarcodeTypeGS1DotCode EncodeBarcodeType = "GS1DotCode" EncodeBarcodeTypeGS1HanXin EncodeBarcodeType = "GS1HanXin" EncodeBarcodeTypeGS1MicroPdf417 EncodeBarcodeType = "GS1MicroPdf417" EncodeBarcodeTypeGS1QR EncodeBarcodeType = "GS1QR" EncodeBarcodeTypeHanXin EncodeBarcodeType = "HanXin" EncodeBarcodeTypeIATA2of5 EncodeBarcodeType = "IATA2of5" EncodeBarcodeTypeISBN EncodeBarcodeType = "ISBN" EncodeBarcodeTypeISMN EncodeBarcodeType = "ISMN" EncodeBarcodeTypeISSN EncodeBarcodeType = "ISSN" EncodeBarcodeTypeITF14 EncodeBarcodeType = "ITF14" EncodeBarcodeTypeITF6 EncodeBarcodeType = "ITF6" EncodeBarcodeTypeInterleaved2of5 EncodeBarcodeType = "Interleaved2of5" EncodeBarcodeTypeItalianPost25 EncodeBarcodeType = "ItalianPost25" EncodeBarcodeTypeMSI EncodeBarcodeType = "MSI" EncodeBarcodeTypeMacroPdf417 EncodeBarcodeType = "MacroPdf417" EncodeBarcodeTypeMailmark EncodeBarcodeType = "Mailmark" EncodeBarcodeTypeMatrix2of5 EncodeBarcodeType = "Matrix2of5" EncodeBarcodeTypeMaxiCode EncodeBarcodeType = "MaxiCode" EncodeBarcodeTypeMicroPdf417 EncodeBarcodeType = "MicroPdf417" EncodeBarcodeTypeMicroQR EncodeBarcodeType = "MicroQR" EncodeBarcodeTypeOPC EncodeBarcodeType = "OPC" EncodeBarcodeTypeOneCode EncodeBarcodeType = "OneCode" EncodeBarcodeTypePZN EncodeBarcodeType = "PZN" EncodeBarcodeTypePatchCode EncodeBarcodeType = "PatchCode" EncodeBarcodeTypePdf417 EncodeBarcodeType = "Pdf417" EncodeBarcodeTypePharmacode EncodeBarcodeType = "Pharmacode" EncodeBarcodeTypePlanet EncodeBarcodeType = "Planet" EncodeBarcodeTypePostnet EncodeBarcodeType = "Postnet" EncodeBarcodeTypeRM4SCC EncodeBarcodeType = "RM4SCC" EncodeBarcodeTypeRectMicroQR EncodeBarcodeType = "RectMicroQR" EncodeBarcodeTypeSCC14 EncodeBarcodeType = "SCC14" EncodeBarcodeTypeSSCC18 EncodeBarcodeType = "SSCC18" EncodeBarcodeTypeSingaporePost EncodeBarcodeType = "SingaporePost" EncodeBarcodeTypeStandard2of5 EncodeBarcodeType = "Standard2of5" EncodeBarcodeTypeSwissPostParcel EncodeBarcodeType = "SwissPostParcel" EncodeBarcodeTypeUPCA EncodeBarcodeType = "UPCA" EncodeBarcodeTypeUPCE EncodeBarcodeType = "UPCE" EncodeBarcodeTypeUpcaGs1Code128Coupon EncodeBarcodeType = "UpcaGs1Code128Coupon" EncodeBarcodeTypeUpcaGs1DatabarCoupon EncodeBarcodeType = "UpcaGs1DatabarCoupon" EncodeBarcodeTypeVIN EncodeBarcodeType = "VIN" )
List of EncodeBarcodeType
type EncodeData ¶
type EncodeData struct {
DataType EncodeDataType `json:"dataType,omitempty"`
// String represents data to encode
Data string `json:"data"`
}
EncodeData - Data to encode in barcode
type EncodeDataType ¶
type EncodeDataType string
EncodeDataType : Types of data can be encoded to barcode
const ( EncodeDataTypeStringData EncodeDataType = "StringData" EncodeDataTypeBase64Bytes EncodeDataType = "Base64Bytes" EncodeDataTypeHexBytes EncodeDataType = "HexBytes" )
List of EncodeDataType
type GenerateAPIGenerateMultipartOpts ¶
type GenerateAPIGenerateMultipartOpts struct {
DataType optional.Interface
ImageFormat optional.Interface
TextLocation optional.Interface
ForegroundColor optional.String
BackgroundColor optional.String
Units optional.Interface
Resolution optional.Float32
ImageHeight optional.Float32
ImageWidth optional.Float32
RotationAngle optional.Int32
}
GenerateAPIGenerateMultipartOpts - Optional Parameters for GenerateAPIGenerateMultipart
type GenerateAPIGenerateOpts ¶
type GenerateAPIGenerateOpts struct {
DataType optional.Interface
ImageFormat optional.Interface
TextLocation optional.Interface
ForegroundColor optional.String
BackgroundColor optional.String
Units optional.Interface
Resolution optional.Float32
ImageHeight optional.Float32
ImageWidth optional.Float32
RotationAngle optional.Int32
}
GenerateAPIGenerateOpts - Optional Parameters for GenerateAPIGenerate
type GenerateAPIService ¶
type GenerateAPIService service
GenerateAPIService -
func (*GenerateAPIService) Generate ¶
func (a *GenerateAPIService) Generate(ctx context.Context, barcodeType EncodeBarcodeType, data string, optionals *GenerateAPIGenerateOpts) ([]byte, *http.Response, error)
* Generate - Generate barcode using GET request with parameters in route and query string. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param barcodeType Type of barcode to generate. * @param data String represents data to encode * @param optional nil or *GenerateAPIGenerateOpts - Optional Parameters:
- @param "DataType" (optional.Interface of EncodeDataType) - Type of data to encode. Default value: StringData.
- @param "ImageFormat" (optional.Interface of BarcodeImageFormat) - Barcode output image format. Default value: png
- @param "TextLocation" (optional.Interface of CodeLocation) - Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: Depends on BarcodeType. CodeLocation.Below for 1D Barcodes. CodeLocation.None for 2D Barcodes.
- @param "ForegroundColor" (optional.String) - Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black.
- @param "BackgroundColor" (optional.String) - Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White.
- @param "Units" (optional.Interface of GraphicsUnit) - Common Units for all measuring in query. Default units: pixel.
- @param "Resolution" (optional.Float32) - Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot.
- @param "ImageHeight" (optional.Float32) - Height of the barcode image in given units. Default units: pixel. Decimal separator is dot.
- @param "ImageWidth" (optional.Float32) - Width of the barcode image in given units. Default units: pixel. Decimal separator is dot.
- @param "RotationAngle" (optional.Int32) - BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.
* @return []byte
func (*GenerateAPIService) GenerateBody ¶
func (a *GenerateAPIService) GenerateBody(ctx context.Context, generateParams GenerateParams) ([]byte, *http.Response, error)
* GenerateBody - Generate barcode using POST request with parameters in body in json or xml format. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param generateParams Parameters of generation
* @return []byte
func (*GenerateAPIService) GenerateMultipart ¶
func (a *GenerateAPIService) GenerateMultipart(ctx context.Context, barcodeType EncodeBarcodeType, data string, optionals *GenerateAPIGenerateMultipartOpts) ([]byte, *http.Response, error)
* GenerateMultipart - Generate barcode using POST request with parameters in multipart form. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param barcodeType * @param data String represents data to encode * @param optional nil or *GenerateAPIGenerateMultipartOpts - Optional Parameters:
- @param "DataType" (optional.Interface of EncodeDataType) -
- @param "ImageFormat" (optional.Interface of BarcodeImageFormat) -
- @param "TextLocation" (optional.Interface of CodeLocation) -
- @param "ForegroundColor" (optional.String) - Specify the displaying bars and content Color. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: Black.
- @param "BackgroundColor" (optional.String) - Background color of the barcode image. Value: Color name from https://reference.aspose.com/drawing/net/system.drawing/color/ or ARGB value started with #. For example: AliceBlue or #FF000000 Default value: White.
- @param "Units" (optional.Interface of GraphicsUnit) -
- @param "Resolution" (optional.Float32) - Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. Decimal separator is dot.
- @param "ImageHeight" (optional.Float32) - Height of the barcode image in given units. Default units: pixel. Decimal separator is dot.
- @param "ImageWidth" (optional.Float32) - Width of the barcode image in given units. Default units: pixel. Decimal separator is dot.
- @param "RotationAngle" (optional.Int32) - BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.
* @return []byte
type GenerateParams ¶
type GenerateParams struct {
BarcodeType EncodeBarcodeType `json:"barcodeType"`
EncodeData EncodeData `json:"encodeData"`
BarcodeImageParams BarcodeImageParams `json:"barcodeImageParams,omitempty"`
}
GenerateParams - Barcode generation parameters
type GenericAPIError ¶
type GenericAPIError struct {
StatusCode int
// contains filtered or unexported fields
}
GenericAPIError Provides access to the body, error and model on returned errors.
func (GenericAPIError) Error ¶
func (e GenericAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericAPIError) Model ¶
func (e GenericAPIError) Model() interface{}
Model returns the unpacked model of the error
func (GenericAPIError) Text ¶
func (e GenericAPIError) Text() string
Text returns the text of the response
type GraphicsUnit ¶
type GraphicsUnit string
GraphicsUnit : Subset of Aspose.Drawing.GraphicsUnit.
const ( GraphicsUnitPixel GraphicsUnit = "Pixel" GraphicsUnitPoint GraphicsUnit = "Point" GraphicsUnitInch GraphicsUnit = "Inch" GraphicsUnitMillimeter GraphicsUnit = "Millimeter" )
List of GraphicsUnit
type MappedNullable ¶
type NullableBool ¶
type NullableBool struct {
// contains filtered or unexported fields
}
func NewNullableBool ¶
func NewNullableBool(val *bool) *NullableBool
func (NullableBool) Get ¶
func (v NullableBool) Get() *bool
func (NullableBool) IsSet ¶
func (v NullableBool) IsSet() bool
func (NullableBool) MarshalJSON ¶
func (v NullableBool) MarshalJSON() ([]byte, error)
func (*NullableBool) Set ¶
func (v *NullableBool) Set(val *bool)
func (*NullableBool) UnmarshalJSON ¶
func (v *NullableBool) UnmarshalJSON(src []byte) error
func (*NullableBool) Unset ¶
func (v *NullableBool) Unset()
type NullableFloat32 ¶
type NullableFloat32 struct {
// contains filtered or unexported fields
}
func NewNullableFloat32 ¶
func NewNullableFloat32(val *float32) *NullableFloat32
func (NullableFloat32) Get ¶
func (v NullableFloat32) Get() *float32
func (NullableFloat32) IsSet ¶
func (v NullableFloat32) IsSet() bool
func (NullableFloat32) MarshalJSON ¶
func (v NullableFloat32) MarshalJSON() ([]byte, error)
func (*NullableFloat32) Set ¶
func (v *NullableFloat32) Set(val *float32)
func (*NullableFloat32) UnmarshalJSON ¶
func (v *NullableFloat32) UnmarshalJSON(src []byte) error
func (*NullableFloat32) Unset ¶
func (v *NullableFloat32) Unset()
type NullableFloat64 ¶
type NullableFloat64 struct {
// contains filtered or unexported fields
}
func NewNullableFloat64 ¶
func NewNullableFloat64(val *float64) *NullableFloat64
func (NullableFloat64) Get ¶
func (v NullableFloat64) Get() *float64
func (NullableFloat64) IsSet ¶
func (v NullableFloat64) IsSet() bool
func (NullableFloat64) MarshalJSON ¶
func (v NullableFloat64) MarshalJSON() ([]byte, error)
func (*NullableFloat64) Set ¶
func (v *NullableFloat64) Set(val *float64)
func (*NullableFloat64) UnmarshalJSON ¶
func (v *NullableFloat64) UnmarshalJSON(src []byte) error
func (*NullableFloat64) Unset ¶
func (v *NullableFloat64) Unset()
type NullableInt ¶
type NullableInt struct {
// contains filtered or unexported fields
}
func NewNullableInt ¶
func NewNullableInt(val *int) *NullableInt
func (NullableInt) Get ¶
func (v NullableInt) Get() *int
func (NullableInt) IsSet ¶
func (v NullableInt) IsSet() bool
func (NullableInt) MarshalJSON ¶
func (v NullableInt) MarshalJSON() ([]byte, error)
func (*NullableInt) Set ¶
func (v *NullableInt) Set(val *int)
func (*NullableInt) UnmarshalJSON ¶
func (v *NullableInt) UnmarshalJSON(src []byte) error
func (*NullableInt) Unset ¶
func (v *NullableInt) Unset()
type NullableInt32 ¶
type NullableInt32 struct {
// contains filtered or unexported fields
}
func NewNullableInt32 ¶
func NewNullableInt32(val *int32) *NullableInt32
func (NullableInt32) Get ¶
func (v NullableInt32) Get() *int32
func (NullableInt32) IsSet ¶
func (v NullableInt32) IsSet() bool
func (NullableInt32) MarshalJSON ¶
func (v NullableInt32) MarshalJSON() ([]byte, error)
func (*NullableInt32) Set ¶
func (v *NullableInt32) Set(val *int32)
func (*NullableInt32) UnmarshalJSON ¶
func (v *NullableInt32) UnmarshalJSON(src []byte) error
func (*NullableInt32) Unset ¶
func (v *NullableInt32) Unset()
type NullableInt64 ¶
type NullableInt64 struct {
// contains filtered or unexported fields
}
func NewNullableInt64 ¶
func NewNullableInt64(val *int64) *NullableInt64
func (NullableInt64) Get ¶
func (v NullableInt64) Get() *int64
func (NullableInt64) IsSet ¶
func (v NullableInt64) IsSet() bool
func (NullableInt64) MarshalJSON ¶
func (v NullableInt64) MarshalJSON() ([]byte, error)
func (*NullableInt64) Set ¶
func (v *NullableInt64) Set(val *int64)
func (*NullableInt64) UnmarshalJSON ¶
func (v *NullableInt64) UnmarshalJSON(src []byte) error
func (*NullableInt64) Unset ¶
func (v *NullableInt64) Unset()
type NullableString ¶
type NullableString struct {
// contains filtered or unexported fields
}
func NewNullableString ¶
func NewNullableString(val *string) *NullableString
func (NullableString) Get ¶
func (v NullableString) Get() *string
func (NullableString) IsSet ¶
func (v NullableString) IsSet() bool
func (NullableString) MarshalJSON ¶
func (v NullableString) MarshalJSON() ([]byte, error)
func (*NullableString) Set ¶
func (v *NullableString) Set(val *string)
func (*NullableString) UnmarshalJSON ¶
func (v *NullableString) UnmarshalJSON(src []byte) error
func (*NullableString) Unset ¶
func (v *NullableString) Unset()
type NullableTime ¶
type NullableTime struct {
// contains filtered or unexported fields
}
func NewNullableTime ¶
func NewNullableTime(val *time.Time) *NullableTime
func (NullableTime) Get ¶
func (v NullableTime) Get() *time.Time
func (NullableTime) IsSet ¶
func (v NullableTime) IsSet() bool
func (NullableTime) MarshalJSON ¶
func (v NullableTime) MarshalJSON() ([]byte, error)
func (*NullableTime) Set ¶
func (v *NullableTime) Set(val *time.Time)
func (*NullableTime) UnmarshalJSON ¶
func (v *NullableTime) UnmarshalJSON(src []byte) error
func (*NullableTime) Unset ¶
func (v *NullableTime) Unset()
type RecognitionImageKind ¶
type RecognitionImageKind string
RecognitionImageKind : Kind of image to recognize
const ( RecognitionImageKindPhoto RecognitionImageKind = "Photo" RecognitionImageKindScannedDocument RecognitionImageKind = "ScannedDocument" RecognitionImageKindClearImage RecognitionImageKind = "ClearImage" )
List of RecognitionImageKind
type RecognitionMode ¶
type RecognitionMode string
RecognitionMode : Recognition mode.
const ( RecognitionModeFast RecognitionMode = "Fast" RecognitionModeNormal RecognitionMode = "Normal" RecognitionModeExcellent RecognitionMode = "Excellent" )
List of RecognitionMode
type RecognizeAPIRecognizeMultipartOpts ¶
type RecognizeAPIRecognizeMultipartOpts struct {
RecognitionMode optional.Interface
RecognitionImageKind optional.Interface
}
RecognizeAPIRecognizeMultipartOpts - Optional Parameters for RecognizeAPIRecognizeMultipart
type RecognizeAPIRecognizeOpts ¶
type RecognizeAPIRecognizeOpts struct {
RecognitionMode optional.Interface
RecognitionImageKind optional.Interface
}
RecognizeAPIRecognizeOpts - Optional Parameters for RecognizeAPIRecognize
type RecognizeAPIService ¶
type RecognizeAPIService service
RecognizeAPIService -
func (*RecognizeAPIService) Recognize ¶
func (a *RecognizeAPIService) Recognize(ctx context.Context, barcodeType DecodeBarcodeType, fileUrl string, optionals *RecognizeAPIRecognizeOpts) (BarcodeResponseList, *http.Response, error)
* Recognize - Recognize barcode from file on server in the Internet using GET requests with parameter in query string. For recognizing files from your hard drive use `recognize-body` or `recognize-multipart` endpoints instead. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param barcodeType Type of barcode to recognize * @param fileUrl Url to barcode image * @param optional nil or *RecognizeAPIRecognizeOpts - Optional Parameters:
- @param "RecognitionMode" (optional.Interface of RecognitionMode) - Recognition mode
- @param "RecognitionImageKind" (optional.Interface of RecognitionImageKind) - Image kind for recognition
* @return BarcodeResponseList
func (*RecognizeAPIService) RecognizeBase64 ¶
func (a *RecognizeAPIService) RecognizeBase64(ctx context.Context, recognizeBase64Request RecognizeBase64Request) (BarcodeResponseList, *http.Response, error)
* RecognizeBase64 - Recognize barcode from file in request body using POST requests with parameters in body in json or xml format. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param recognizeBase64Request Barcode recognition request
* @return BarcodeResponseList
func (*RecognizeAPIService) RecognizeMultipart ¶
func (a *RecognizeAPIService) RecognizeMultipart(ctx context.Context, barcodeType DecodeBarcodeType, file *os.File, optionals *RecognizeAPIRecognizeMultipartOpts) (BarcodeResponseList, *http.Response, error)
* RecognizeMultipart - Recognize barcode from file in request body using POST requests with parameters in multipart form. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param barcodeType * @param file Barcode image file * @param optional nil or *RecognizeAPIRecognizeMultipartOpts - Optional Parameters:
- @param "RecognitionMode" (optional.Interface of RecognitionMode) -
- @param "RecognitionImageKind" (optional.Interface of RecognitionImageKind) -
* @return BarcodeResponseList
type RecognizeBase64Request ¶
type RecognizeBase64Request struct {
// Array of decode types to find on barcode
BarcodeTypes []DecodeBarcodeType `json:"barcodeTypes"`
// Barcode image bytes encoded as base-64.
FileBase64 string `json:"fileBase64"`
RecognitionMode RecognitionMode `json:"recognitionMode,omitempty"`
RecognitionImageKind RecognitionImageKind `json:"recognitionImageKind,omitempty"`
}
RecognizeBase64Request - Barcode recognize request
type RegionPoint ¶
type RegionPoint struct {
// X-coordinate
X int32 `json:"x,omitempty"`
// Y-coordinate
Y int32 `json:"y,omitempty"`
}
RegionPoint - Wrapper around Drawing.Point for proper specification.
type ScanAPIService ¶
type ScanAPIService service
ScanAPIService -
func (*ScanAPIService) Scan ¶
func (a *ScanAPIService) Scan(ctx context.Context, fileUrl string) (BarcodeResponseList, *http.Response, error)
* Scan - Scan barcode from file on server in the Internet using GET requests with parameter in query string. For scaning files from your hard drive use `scan-body` or `scan-multipart` endpoints instead. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param fileUrl Url to barcode image
* @return BarcodeResponseList
func (*ScanAPIService) ScanBase64 ¶
func (a *ScanAPIService) ScanBase64(ctx context.Context, scanBase64Request ScanBase64Request) (BarcodeResponseList, *http.Response, error)
* ScanBase64 - Scan barcode from file in request body using POST requests with parameter in body in json or xml format. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param scanBase64Request Barcode scan request
* @return BarcodeResponseList
func (*ScanAPIService) ScanMultipart ¶
func (a *ScanAPIService) ScanMultipart(ctx context.Context, file *os.File) (BarcodeResponseList, *http.Response, error)
* ScanMultipart - Scan barcode from file in request body using POST requests with parameter in multipart form. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param file Barcode image file
* @return BarcodeResponseList
type ScanBase64Request ¶
type ScanBase64Request struct {
// Barcode image bytes encoded as base-64.
FileBase64 string `json:"fileBase64"`
}
ScanBase64Request - Scan barcode request.
Source Files
¶
- api_generate.go
- api_recognize.go
- api_scan.go
- client.go
- configuration.go
- model_api_error.go
- model_api_error_response.go
- model_barcode_image_format.go
- model_barcode_image_params.go
- model_barcode_response.go
- model_barcode_response_list.go
- model_code_location.go
- model_decode_barcode_type.go
- model_encode_barcode_type.go
- model_encode_data.go
- model_encode_data_type.go
- model_generate_params.go
- model_graphics_unit.go
- model_recognition_image_kind.go
- model_recognition_mode.go
- model_recognize_base64_request.go
- model_region_point.go
- model_scan_base64_request.go
- utils.go