gatewaylambda

package
v0.0.0-...-5c68377 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientKey

func NewClientKey(
	getHeader func(name string) (string, bool),
) (db.DeviceCryptoKey, error)

func NewClientVersion

func NewClientVersion(
	getHeader func(name string) (string, bool),
) (string, error)

Types

type ClientInfo

type ClientInfo struct {
	Version  string                          `json:"ver"`
	Device   ss.DeviceID                     `json:"device"`
	FCMToken *ss.FirebaseCloudMessagingToken `json:"fcm,omitempty"`
	Key      db.DeviceCryptoKey              `json:"key"`
}

func NewClientInfo

func NewClientInfo(
	getHeader func(name string) (string, bool),
) (
	result ClientInfo,
	err error,
)

func (ClientInfo) MarshalLogMsg

func (info ClientInfo) MarshalLogMsg(destination map[string]interface{})

type Request

type Request struct {
	ss.NoCopyImpl

	ResponseBody interface{}
	// contains filtered or unexported fields
}

Request implements request method for output gateway.

func NewRequest

func NewRequest(
	gateway lambda.Gateway,
	log ss.LogSession,
	defaultResponse interface{},
) Request

NewRequest creates new Request instance.

func (*Request) Log

func (request *Request) Log() ss.LogStream

Log returns request log session.

func (*Request) Respond

func (request *Request) Respond(response interface{})

Response responses to request with given data.

func (*Request) UnmarshalRequest

func (request *Request) UnmarshalRequest(
	source string,
	result interface{},
) error

UnmarshalRequest parses request from a string.

type Service

type Service struct{ Gateway lambda.Gateway }

Service implements methods of lambda service which has an output gateway.

func NewService

func NewService() Service

NewService creates new Service instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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