backend

package
v0.0.0-...-c346e67 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSpannerIAM

func AddSpannerIAM(ctx context.Context, googleAccount string, serviceAccounts []string) error

AddSpannerIAM is SpannerのIAMをAccountに追加する

func Setup

func Setup()

Types

type HTTPError

type HTTPError struct {
	Code    int         `json:"code"`
	Message interface{} `json:"message"`
}

HTTPError is API Resposeとして返すError

func (*HTTPError) Error

func (he *HTTPError) Error() string

Error is error interfaceを実装

func (*HTTPError) ErrorMessage

func (he *HTTPError) ErrorMessage() interface{}

ErrorMessage is Clientに返すErrorMessageを返す

func (*HTTPError) StatusCode

func (he *HTTPError) StatusCode() int

StatusCode is Http Response Status Codeを返す

type SpannerAccount

type SpannerAccount struct {
	Key             datastore.Key `datastore:"-" json:"-"`
	KeyStr          string        `datastore:"-" json:"key"`
	GCPUGSlackID    string        `json:"gcpugSlackId"`
	ServiceAccounts []string      `json:"serviceAccounts"`
	CreatedAt       time.Time     `json:"createdAt"`
	UpdatedAt       time.Time     `json:"updatedAt"`
	SchemaVersion   int           `json:"-"`
}

SpannerAccount is Spanner利用者Account Datastore Entity Model +qbg

func (*SpannerAccount) Load

Load is Entity Load時に呼ばれる

func (*SpannerAccount) LoadKey

func (e *SpannerAccount) LoadKey(ctx context.Context, k datastore.Key) error

LoadKey is Entity Load時にKeyを設定する

func (*SpannerAccount) Save

Save is Entity Save時に呼ばれる

type SpannerAccountAPI

type SpannerAccountAPI struct{}

SpannerAccountAPI is Organization Admin API Functions

func (*SpannerAccountAPI) Post

Post is SpannerAccountを登録する

type SpannerAccountAPIPostRequest

type SpannerAccountAPIPostRequest struct {
	GCPUGSlackID    string   `json:"gcpugSlackId"`
	ServiceAccounts []string `json:"serviceAccounts"`
}

SpannerAccountAPIPostRequest is Organization Admin Post API Request

type SpannerAccountAPIPostResponse

type SpannerAccountAPIPostResponse struct {
	*SpannerAccount
}

SpannerAccountAPIPostResponse is Organization Admin Post API Response

type SpannerAccountStore

type SpannerAccountStore struct {
	DatastoreClient datastore.Client
}

SpannerAccountStore is SpannerAccountのDatastoreの操作を司る

func NewSpannerAccountStore

func NewSpannerAccountStore(ctx context.Context) (*SpannerAccountStore, error)

NewSpannerAccountStore is SpannerAccountStoreを作成

func (*SpannerAccountStore) Get

Get is SpannerAccountをDatastoreからgetする

func (*SpannerAccountStore) Kind

func (store *SpannerAccountStore) Kind() string

Kind is SpannerAccountのKindを返す

func (*SpannerAccountStore) NameKey

func (store *SpannerAccountStore) NameKey(ctx context.Context, name string) datastore.Key

NameKey is SpannerAccountの指定したNameを利用したKeyを生成する

func (*SpannerAccountStore) Upsert

Create is SpannerAccountをDatastoreにputする

type User

type User struct {
	Email string
}

Jump to

Keyboard shortcuts

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