Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInvalidParams(s string) error
- func GetGAEContext(ctx context.Context) context.Context
- func GetTokenSource(ctx context.Context, jwtpath string, scopes ...string) (oauth2.TokenSource, error)
- func PutGAEContext(ctx, gaectx context.Context)
- func WrapWithRemoteContext(host string, c *http.Client) (ctx context.Context, err error)
- type ClientType
- type DbExInt
- type DbInt
- type DbiIterator
- type DbiKey
- type DbiKeyArr
- func (o DbiKeyArr) Append(a DbiKey) (out DbiKeyArr)
- func (o DbiKeyArr) AppendArr(a DbiKeyArr) (out DbiKeyArr)
- func (o DbiKeyArr) ForEach(fn func(DbiKey) (bContinue bool))
- func (o DbiKeyArr) Len() (n int)
- func (o DbiKeyArr) ToDbiKeyArray() (ks []DbiKey)
- func (o DbiKeyArr) ToStringArray() (ks []string)
- type DbiQuery
- type DbiTransaction
- type DbiTrxOpts
- type LogEx
- type LogExtended
- type LogInt
- type StorInt
- type Store
- type Tk
- type WebInt
Constants ¶
View Source
const ( ContextParam = "context" LoggerParam = "logger" OptsParam = "opts" UseCloudParam = "use_cloud" )
View Source
const ( WebiContext = ContextParam WebiLogger = LoggerParam WebiJar = "jar" )
View Source
const ( StoriContext = ContextParam StoriLogger = LoggerParam StoriOpts = OptsParam StoriProjectID = "projectID" StoriBucket = "bucket" )
View Source
const ( DbiContext = ContextParam DbiLogger = LoggerParam DbiAppID = "appid" DbiName = "name" // dbi Kind DbiOpts = OptsParam DbiUseUpdated = "use_updated" DbiUseCloud = UseCloudParam )
View Source
const (
GAEContextKey _gaecontextKeyName = iota
)
Variables ¶
View Source
var ErrInternalError = fmt.Errorf("Internal Error.")
View Source
var ErrNotSupported = fmt.Errorf("Not Supported.")
View Source
var (
LocationPH, _ = time.LoadLocation("Asia/Manila")
)
Functions ¶
func ErrInvalidParams ¶
func GetTokenSource ¶
func PutGAEContext ¶
Types ¶
type ClientType ¶
type ClientType int
const ( DefaultClient ClientType = iota + 1 StorageClient DatastoreClient )
type DbExInt ¶
type DbExInt interface { DbInt IsCloud() bool PutObject(k string, o interface{}) (err error) GetObject(k string, o interface{}) (err error) //- IsDone(error) bool Kind() string Context() context.Context //KindProperties() (map[string][]string, error) //- DeleteAll(ks DbiKeyArr) error PutAll(ks DbiKeyArr, src interface{}) error RunInTransaction(fn DbiTransaction, opts DbiTrxOpts) error CreateKey(stringID string, intID int64, parentK *DbiKey) DbiKey // queries GetRangeKeys(begink, endk string) (DbiKeyArr, error) GetKeysBeginsWith(begink string) (DbiKeyArr, error) NewQuery() DbiQuery Run(DbiQuery) DbiIterator GetAll(DbiQuery, interface{}) (DbiKeyArr, error) // new context NewContext(c context.Context) DbInt }
type DbiIterator ¶
func (DbiIterator) IsNil ¶
func (o DbiIterator) IsNil() bool
func (*DbiIterator) Next ¶
func (o *DbiIterator) Next(dst interface{}) (DbiKey, error)
type DbiTransaction ¶
type DbiTransaction struct { Cloud func(*cloudds.Transaction) error Local func(netcontext.Context) error }
type DbiTrxOpts ¶
type DbiTrxOpts struct { Cloud []cloudds.TransactionOption Local *localds.TransactionOptions }
type LogEx ¶
type LogEx struct {
LogInt
}
func (LogEx) Criticalln ¶
func (this LogEx) Criticalln(as ...interface{})
type LogExtended ¶
type LogExtended interface { LogInt Println(...interface{}) Errorln(...interface{}) Criticalln(...interface{}) Fatalln(...interface{}) }
func ExtendLogger ¶
func ExtendLogger(l LogInt) LogExtended
type LogInt ¶
type LogInt interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Criticalf(format string, args ...interface{}) Email(subject, body string) EmailTo(ss []string, subject, body string, bHtml bool) SetCallDepth(n int) Output(calldepth int, logFn func(format string, args ...interface{}), s string) }
type StorInt ¶
type StorInt interface { Delete(fpath string) error Reader(fpath string) (io.ReadCloser, error) Writer(fpath string) (io.WriteCloser, error) }
type Store ¶
type Store interface { Get(k interface{}) (v interface{}, exists bool) Set(k, v interface{}) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.