firebase

package
v0.0.0-...-c78652d Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUser

func DeleteUser(w http.ResponseWriter, token *auth.Token) error

DeleteUser はユーザ情報を抹消します。

func GetOption

func GetOption() option.ClientOption

GetOption はOptionを生成します。(未設定の場合は admin.json を読みます)

func SetOption

func SetOption(credFile string)

SetOption は firebase のオプションを設定します。

func VerifyUser

func VerifyUser(w http.ResponseWriter, reqToken string) (*auth.Token, error)

VerifyUser はIDトークンを検証した結果を返します。

Types

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

Collection はfirestoreのコレクションを表します。

func NewCollection

func NewCollection(collection string) *Collection

NewCollection は Collecction のインスタンスを生成します。

func (*Collection) Delete

func (f *Collection) Delete(key string) error

Delete は Collection からキーを削除します。

func (*Collection) Get

func (f *Collection) Get(key string) (string, error)

Get は Collection でキーから値を検索します。

func (*Collection) GetMap

func (f *Collection) GetMap(key string) (map[string]string, error)

GetMap は生のドキュメントを取得します。

func (*Collection) Keys

func (f *Collection) Keys() []string

Keys はキーの一覧を返します。

func (*Collection) Set

func (f *Collection) Set(key, value string) error

Set は Collection に値を保存します。

func (*Collection) SetMap

func (f *Collection) SetMap(key string, data map[string]string) error

SetMap は Collection にマップを保存します。

Jump to

Keyboard shortcuts

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