pojo

package
v0.0.0-...-2effe50 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

  • Copyright (c) 2022 eBay Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

This package contains all required pojo

Index

Constants

View Source
const (
	//SANDBOX Environment string
	SANDBOX string = "SANDBOX"

	//PRODUCTION Environment string
	PRODUCTION = "PRODUCTION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sandbox           Environment `json:"SANDBOX"`
	Production        Environment `json:"PRODUCTION"`
	Endpoint          string      `json:"endpoint"`
	VerificationToken string      `json:"verificationToken"`
}

Config is configuration file object

type CustomEnvironment

type CustomEnvironment struct {
	BaseURL      string `json:"baseUrl"`
	RedirectURI  string `json:"redirectUri"`
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	DevID        string `json:"devid"`
	Environment  string
}

CustomEnvironment is configuration environment specific file

type Environment

type Environment struct {
	BaseURL      string `json:"baseUrl"`
	RedirectURI  string `json:"redirectUri"`
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	DevID        string `json:"devid"`
}

Environment is configuration environment specific file

type Message

type Message struct {
	Metadata     Metadata     `json:"metadata"`
	Notification Notification `json:"notification"`
}

Message is norification message

type Metadata

type Metadata struct {
	Topic         string `json:"topic"`
	SchemaVersion string `json:"schemaVersion"`
	Deprecated    bool   `json:"deprecated"`
}

Metadata is notification metadata

type Notification

type Notification struct {
	NotificationID      string      `json:"notificationId"`
	EventDate           string      `json:"eventDate"`
	PublishDate         string      `json:"publishDate"`
	PublishAttemptCount int         `json:"publishAttemptCount"`
	PayloadData         PayloadData `json:"data"`
}

Notification is notification object

type Payload

type Payload struct {
	Signature string   `json:"signature"`
	Message   Message  `json:"message"`
	Response  Response `json:"response"`
	PublicKey string   `json:"public_key"`
}

Payload is payload object

type PayloadData

type PayloadData struct {
	Username  string `json:"username"`
	UserID    string `json:"userId"`
	EiasToken string `json:"eiasToken"`
}

PayloadData is user payload

type Response

type Response struct {
	Key       string `json:"key"`
	Algorithm string `json:"algorithm"`
	Digest    string `json:"digest"`
}

Response is response object

type XeBaySignatureHeader

type XeBaySignatureHeader struct {
	Alg       string `json:"alg"`
	Digest    string `json:"digest"`
	Kid       string `json:"kid"`
	Signature string `json:"signature"`
}

XeBaySignatureHeader is pojo for signature creation

Jump to

Keyboard shortcuts

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