wwfirebase

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppContext   context.Context = context.Background()
	FbRef        *db.Ref
	FbClient     *db.Client
	FbAuthClient *auth.Client
)
View Source
var LOGGER = logging.MustGetLogger("wwfirebase")

Functions

func AuthenticateWithAdminPrivileges

func AuthenticateWithAdminPrivileges() (*db.Client, *auth.Client, error)

AuthenticateForAuthService: Returns dbclient and authclient.

func GetRootRef

func GetRootRef() *db.Ref

func PrintLog

func PrintLog(message string) string

func SendFBTrustSuccess

func SendFBTrustSuccess(trustRequest model.Trust) error

This function transmits the trust line request result directly to firebase database. Since requestor and issuer are two actors on the same trust request, the firebase DB connected the portal to show the updated state on the UI using firebase DB as common data store

func WithLogging

func WithLogging() mux.MiddlewareFunc

Logging middleware

Types

type Dinosaur

type Dinosaur struct {
	Height int `json:"height"`
	Width  int `json:"width"`
}

Dinosaur is a json-serializable type.

type FbTrustLogSuccess

type FbTrustLogSuccess struct {
	// Log for successful trust operation
	TimeUpdated    *int64  `json:"time_updated"`
	RequestorID    *string `json:"requestor_id"`
	IssuerID       *string `json:"issuer_id"`
	AccountName    *string `json:"account_name"`
	AssetCode      *string `json:"asset_code"`
	Limit          int64   `json:"limit"`
	Status         *string `json:"status"`
	ReasonRejected *string `json:"reason_rejected"`
}

type Post

type Post struct {
	Author string `json:"author,omitempty"`
	Title  string `json:"title,omitempty"`
}

Post is a json-serializable type.

type User

type User struct {
	DateOfBirth string `json:"date_of_birth,omitempty"`
	FullName    string `json:"full_name,omitempty"`
	Nickname    string `json:"nickname,omitempty"`
}

User is a json-serializable type.

Jump to

Keyboard shortcuts

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