Documentation ¶
Index ¶
- Variables
- type Helper
- func (Helper) CookieName() string
- func (Helper) Error(c codes.Code, msg string) error
- func (Helper) Errorf(c codes.Code, format string, a ...interface{}) error
- func (h Helper) GetToken(ctx context.Context) (token string)
- func (h Helper) InternalSession(ctx context.Context) (newctx context.Context, session *sessionid.Session, e error)
- func (h Helper) JSONUserdata(ctx context.Context) (context.Context, *sessionid.Session, error)
- func (Helper) ServeContent(stream grpc.ServerStream, contentType string, modtime time.Time, ...) error
- func (h Helper) ServeFile(stream grpc.ServerStream, name string) error
- func (Helper) ServeMessage(ctx context.Context, modtime time.Time, response func(nobody bool) error) (e error)
- func (h Helper) ServeName(stream grpc.ServerStream, name string, modtime time.Time, ...) error
- func (h Helper) Session(ctx context.Context) (newctx context.Context, session *sessionid.Session, e error)
- func (Helper) SetHTTPCacheExpress(ctx context.Context, express time.Time) error
- func (Helper) SetHTTPCacheMaxAge(ctx context.Context, maxAge int) error
- func (Helper) SetHTTPCode(ctx context.Context, code int) error
- func (Helper) SetHTTPCookie(ctx context.Context, cookie ...*http.Cookie) error
- func (h Helper) ToHTTPError(name string, e error) error
- func (h Helper) Userdata(ctx context.Context) (newctx context.Context, session *sessionid.Session, e error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CookieName = strings.ReplaceAll(`github.com/powerpuffpenguin/webpc.session`, `/`, `.`)
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper int
func (Helper) CookieName ¶
func (Helper) InternalSession ¶ added in v1.2.6
func (Helper) JSONUserdata ¶
func (Helper) ServeContent ¶
func (Helper) ServeContent(stream grpc.ServerStream, contentType string, modtime time.Time, content io.ReadSeeker, ) error
ServeContent make stream google.api.HttpBody compatible http download, copy from http.ServeContent.
func (Helper) ServeMessage ¶
func (Helper) ServeMessage(ctx context.Context, modtime time.Time, response func(nobody bool) error, ) (e error)
ServeMessage .
func (Helper) ServeName ¶
func (h Helper) ServeName(stream grpc.ServerStream, name string, modtime time.Time, content io.ReadSeeker, ) error
func (Helper) SetHTTPCacheExpress ¶ added in v1.2.6
func (Helper) SetHTTPCacheMaxAge ¶
func (Helper) SetHTTPCookie ¶
Click to show internal directories.
Click to hide internal directories.