common

package
v0.0.0-...-9206383 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Gin       *gin.Engine
	Storage   *storage.Client
	Firestore *firestore.Client

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewApp

func NewApp(projectID string) *App

func (*App) AddRoute

func (app *App) AddRoute(method, path string, handler gin.HandlerFunc)

func (*App) Close

func (app *App) Close()

func (*App) CompactSerial

func (app *App) CompactSerial(x interface{}) (string, error)

func (*App) Decrypt

func (app *App) Decrypt(key, ciphertext []byte) ([]byte, error)

func (*App) Encrypt

func (app *App) Encrypt(key, payload []byte) ([]byte, error)

func (*App) ExpandSerial

func (app *App) ExpandSerial(serial []byte, dst interface{}) error

func (*App) GetBucket

func (app *App) GetBucket(bucketName string) (*storage.BucketHandle, error)

func (*App) GetJSON

func (app *App) GetJSON(url string, dst interface{}) error

func (*App) GetObject

func (app *App) GetObject(bucket *storage.BucketHandle, objectName string) ([]byte, error)

func (*App) GetObjectAndUnmarshal

func (app *App) GetObjectAndUnmarshal(bucket *storage.BucketHandle, objectName string, dst interface{}) error

func (*App) Graph

func (app *App) Graph(dbNames ...string) *graph.GraphClient

func (*App) MarshalCBOR

func (app *App) MarshalCBOR(x interface{}) ([]byte, error)

func (*App) MarshalJSON

func (app *App) MarshalJSON(x interface{}) ([]byte, error)

func (*App) OptionsHandler

func (app *App) OptionsHandler(c *gin.Context)

func (*App) PostJSON

func (app *App) PostJSON(url string, src, dst interface{}) error

func (*App) SHA1

func (app *App) SHA1(b []byte) []byte

func (*App) SHA256

func (app *App) SHA256(b ...[]byte) []byte

func (*App) SeedDigest

func (app *App) SeedDigest(input string) string

func (*App) Serve

func (app *App) Serve() error

func (*App) ShowRoutes

func (app *App) ShowRoutes() interface{}

func (*App) TimeNow

func (app *App) TimeNow() time.Time

func (*App) Token256

func (api *App) Token256() string

func (*App) UnmarshalCBOR

func (app *App) UnmarshalCBOR(b []byte, dst interface{}) error

func (*App) UnmarshalJSON

func (app *App) UnmarshalJSON(b []byte, dst interface{}) error

func (*App) UseCBOR

func (app *App) UseCBOR()

type Route

type Route struct {
	Method  string
	Path    string
	Handler gin.HandlerFunc `json:"-"`
}

Jump to

Keyboard shortcuts

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