adaptor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: GPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CiamWatcher

type CiamWatcher interface {
	JwtInfo(t string) (map[string]interface{}, *model.TechnicalError)
	OnboardPartner(m model.CiamOnboardPartnerRequest) (*model.CiamUserResponse, *model.TechnicalError)
	Authenticate(m model.CiamAuthenticationRequest) (*model.CiamAuthenticationResponse, *model.TechnicalError)
}

func NewCognito

func NewCognito(c Cognito) CiamWatcher

type Cognito

type Cognito struct {
	Provider *cognito.CognitoIdentityProvider
	UserPool string
	ClientId string
	Scrt     string
	Region   string
	JWK      string
	Logger   *zap.Logger
}

func (*Cognito) JwtInfo

func (c *Cognito) JwtInfo(t string) (map[string]interface{}, *model.TechnicalError)

type Consul

type Consul struct {
	Host    string
	Port    int
	Service string
	Logger  *zap.Logger
	Viper   *viper.Viper
}

func (*Consul) Register

func (c *Consul) Register() *model.TechnicalError

type ConsulWatcher

type ConsulWatcher interface {
	Register() *model.TechnicalError
}

func NewConsul

func NewConsul(c Consul) ConsulWatcher

type Gopaid

type Gopaid struct {
	Host   string
	ApiKey string
	Logger *zap.Logger
	Rest
}

type GopaidAdapter

type GopaidAdapter interface {
	Topup(inp *model.GopaidTopUpRequest) (*model.GopaidTopupResponse, *model.TechnicalError)
}

func NewGopaid

func NewGopaid(g Gopaid) GopaidAdapter

type Josvo

type Josvo struct {
	Host   string
	ApiKey string
	Logger *zap.Logger
	Rest
}

type JosvoAdapter

type JosvoAdapter interface {
	AccountTransfer(inp *model.JosvoAccountTransferRequest) (*model.JosvoAccountTransferResponse, *model.TechnicalError)
}

func NewJosvo

func NewJosvo(j Josvo) JosvoAdapter

type Linksaja

type Linksaja struct {
	Host     string
	Logger   *zap.Logger
	Username string
	Password string
	Rest
}

func (*Linksaja) Authorization

type LinksajaAdapter

func NewLinksaja

func NewLinksaja(l Linksaja) LinksajaAdapter

type Middletrans

type Middletrans struct {
	Host   string
	ApiKey string
	Logger *zap.Logger
	Rest
}

type MiddletransAdapter

type MiddletransAdapter interface {
	WalletTransfer(inp *model.MiddletransWalletTransferRequest) (*model.MiddletransWalletTransferResponse,
		*model.TechnicalError)
}

func NewMiddletrans

func NewMiddletrans(mt Middletrans) MiddletransAdapter

type Rest

type Rest struct {
	BackoffInterval   time.Duration
	MaxJitterInterval time.Duration
	Timeout           time.Duration
}

func (*Rest) Client

func (r *Rest) Client() *httpclient.Client

type S3Bucket

type S3Bucket struct {
	Bucket   string
	Uploader *s3manager.Uploader
	Logger   *zap.Logger
}

func (*S3Bucket) Upload

type S3Watcher

type S3Watcher interface {
	Upload(req *model.S3UploadRequest) (*s3manager.UploadOutput, *model.TechnicalError)
}

func NewS3

func NewS3(b S3Bucket) S3Watcher

type SES

type SES struct {
	Sender *string
	SES    *sesv2.SESV2
	Logger *zap.Logger
}

type SESAdapter

type SESAdapter interface {
	SendEmail(m model.SendEmailRequest) (*model.TransactionResponse, *model.TechnicalError)
}

func NewSES

func NewSES(s SES) SESAdapter

type SQS

type SQS struct {
	SQS *sqs.SQS
}

func (*SQS) DeleteMessages

func (s *SQS) DeleteMessages(q string, h string) *sqs.DeleteMessageOutput

func (*SQS) GetMessages

func (s *SQS) GetMessages(t string) *sqs.Message

func (*SQS) SendMessage

func (s *SQS) SendMessage(q string, msg string) error

type SQSAdapter

type SQSAdapter interface {
	GetMessages(q string) *sqs.Message
	DeleteMessages(q string, h string) *sqs.DeleteMessageOutput
	SendMessage(q string, msg string) error
}

func NewSQS

func NewSQS(c SQS) SQSAdapter

type Xenit

type Xenit struct {
	Host               string
	BasicAuthorization string
	Logger             *zap.Logger
	Rest
}

type XenitAdapter

type XenitAdapter interface {
	WalletTopup(inp *model.XenitWalletTopupRequest) (*model.XenitWalletTopupResponse, *model.TechnicalError)
}

func NewXenit

func NewXenit(x Xenit) XenitAdapter

Jump to

Keyboard shortcuts

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