service

package
v0.0.0-...-39c8326 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthClient *auth.Client
View Source
var DBClient *firestore.Client

Functions

func GenerateJwtAuthHandler

func GenerateJwtAuthHandler(next echo.HandlerFunc) echo.HandlerFunc

func GenerateJwtGetUserTypeHandler

func GenerateJwtGetUserTypeHandler(next echo.HandlerFunc) echo.HandlerFunc

func InitFirebase

func InitFirebase() (err error)

Types

type PubSubMessage

type PubSubMessage struct {
	Message struct {
		Data []byte `json:"data,omitempty"`
		ID   string `json:"id"`
	} `json:"message"`
	Subscription string `json:"subscription"`
}

PubSubMessage is the payload of a Pub/Sub event. See the documentation for more details: https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage

func (*PubSubMessage) BindPubSubMessageData

func (req *PubSubMessage) BindPubSubMessageData(obj interface{}) error

type PubsubClientWrapper

type PubsubClientWrapper struct {
	ProjectID string
	Client    *pubsub.Client
}

func NewPubSubInfo

func NewPubSubInfo(info PubsubClientWrapper) (*PubsubClientWrapper, error)

func (*PubsubClientWrapper) Publish

func (info *PubsubClientWrapper) Publish(topicID string, data interface{}) error

Jump to

Keyboard shortcuts

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