Documentation
¶
Index ¶
- type AWSClients
- type App
- func (app *App) AddRoute(method, path string, handler gin.HandlerFunc)
- func (app *App) CompactSerial(x interface{}) (string, error)
- func (app *App) Debug(state bool)
- func (app *App) Decrypt(key, ciphertext []byte) ([]byte, error)
- func (app *App) Encrypt(key, payload []byte) ([]byte, error)
- func (app *App) ExpandSerial(serial []byte, dst interface{}) error
- func (app *App) GetJSON(url string, dst interface{}) error
- func (app *App) GinHandleCORS(c *gin.Context)
- func (app *App) HandleCORS(w http.ResponseWriter, r *http.Request) bool
- func (app *App) IsDebug() bool
- func (app *App) MarshalCBOR(x interface{}) ([]byte, error)
- func (app *App) MarshalJSON(x interface{}) ([]byte, error)
- func (app *App) NewAuthToken(subject string, customClaims map[string]interface{}) (string, error)
- func (app *App) ParseContentForArray(content string, dst interface{}) error
- func (app *App) ParseContentForObject(content string, dst interface{}) error
- func (app *App) ParseJSON(r *http.Request, dst interface{}) error
- func (app *App) PostJSON(url string, src, dst interface{}, expectingStatus int, ...) error
- func (app *App) SHA1(b []byte) []byte
- func (app *App) SHA256(b ...[]byte) []byte
- func (app *App) SeedDigest(input string) string
- func (app *App) Serve() error
- func (app *App) ShowRoutes() interface{}
- func (app *App) TimeNow() time.Time
- func (api *App) Token256() string
- func (app *App) UnmarshalCBOR(b []byte, dst interface{}) error
- func (app *App) UnmarshalJSON(b []byte, dst interface{}) error
- func (app *App) UseAlgolia(appID, secretPath string)
- func (app *App) UseCBOR()
- func (app *App) UseGCP(projectID string)
- func (app *App) UseJWT(signingKey string)
- func (app *App) ValidateToken(tokenString string) (bool, string, error)
- type Clients
- type EmailClient
- type GCPClients
- func (self *GCPClients) AWSFirebase() *firebase.App
- func (self *GCPClients) AWSFirestore() *firestore.Client
- func (self *GCPClients) Firebase() *firebase.App
- func (self *GCPClients) Firestore() *firestore.Client
- func (self *GCPClients) GCS() *storage.Client
- func (self *GCPClients) GetObjectAndUnmarshal(ctx context.Context, bucket *storage.BucketHandle, objectName string, ...) error
- func (self *GCPClients) GetObjectGCS(ctx context.Context, bucket *storage.BucketHandle, objectName string) ([]byte, error)
- func (self *GCPClients) ListObjectsGCS(ctx context.Context, bucketName, prefix string) (names []string, err error)
- func (self *GCPClients) PubSub() *pubsub.Client
- func (self *GCPClients) S3() *storage.Client
- func (self *GCPClients) SNS() *pubsub.Client
- type MyCustomClaims
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSClients ¶
type App ¶
type App struct { Clients AWSClients GCPClients sync.RWMutex // contains filtered or unexported fields }
func (*App) CompactSerial ¶
func (*App) ExpandSerial ¶
func (*App) GinHandleCORS ¶
func (*App) HandleCORS ¶
func (*App) MarshalCBOR ¶
func (*App) MarshalJSON ¶
func (*App) NewAuthToken ¶
func (*App) ParseContentForArray ¶
func (*App) ParseContentForObject ¶
func (*App) SeedDigest ¶
func (*App) ShowRoutes ¶
func (app *App) ShowRoutes() interface{}
func (*App) UnmarshalCBOR ¶
func (*App) UnmarshalJSON ¶
func (*App) UseAlgolia ¶
UseAlgolia initialises the algolia client
func (*App) UseCBOR ¶
func (app *App) UseCBOR()
UseCBOR is an efficient encoding package, check it out
type EmailClient ¶
func NewEmailClient ¶
func NewEmailClient(account, password, host, port string) *EmailClient
func NewGmailClient ¶
func NewGmailClient(account, password string) *EmailClient
func (*EmailClient) Address ¶
func (self *EmailClient) Address() string
func (*EmailClient) SendMessage ¶
func (self *EmailClient) SendMessage(message []byte, recipients ...string) error
type GCPClients ¶
func (*GCPClients) AWSFirebase ¶
func (self *GCPClients) AWSFirebase() *firebase.App
Firebase lazy loads the client when needed
func (*GCPClients) AWSFirestore ¶
func (self *GCPClients) AWSFirestore() *firestore.Client
Firestore exposes and initalises the firestore db
func (*GCPClients) Firebase ¶
func (self *GCPClients) Firebase() *firebase.App
Firebase lazy loads the client when needed
func (*GCPClients) Firestore ¶
func (self *GCPClients) Firestore() *firestore.Client
Firestore exposes and initalises the firestore db
func (*GCPClients) GCS ¶
func (self *GCPClients) GCS() *storage.Client
func (*GCPClients) GetObjectAndUnmarshal ¶
func (self *GCPClients) GetObjectAndUnmarshal(ctx context.Context, bucket *storage.BucketHandle, objectName string, dst interface{}) error
func (*GCPClients) GetObjectGCS ¶
func (self *GCPClients) GetObjectGCS(ctx context.Context, bucket *storage.BucketHandle, objectName string) ([]byte, error)
func (*GCPClients) ListObjectsGCS ¶
func (self *GCPClients) ListObjectsGCS(ctx context.Context, bucketName, prefix string) (names []string, err error)
ListObjectGCS returns the contents of the directory with the given prefix
func (*GCPClients) PubSub ¶
func (self *GCPClients) PubSub() *pubsub.Client
func (*GCPClients) S3 ¶
func (self *GCPClients) S3() *storage.Client
func (*GCPClients) SNS ¶
func (self *GCPClients) SNS() *pubsub.Client
type MyCustomClaims ¶
type MyCustomClaims struct { jwt.RegisteredClaims Custom map[string]interface{} `json:"custom"` }
Click to show internal directories.
Click to hide internal directories.