entities

package
v0.0.0-...-56ee4c0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionKeyUserSession = "user-session"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	FileId       string      `json:"fileId"`
	Revision     int         `json:"revision"`
	ExportedDate time.Time   `json:"exportedDate"`
	Meta         *types.Meta `json:"meta"`
}

type UserSession

type UserSession struct {
	Id          string    `json:"id"`
	Name        string    `json:"name"`
	UserId      string    `json:"userId"`
	Email       string    `json:"email"`
	State       string    `json:"state"`
	Token       string    `json:"token"`
	CreatedAt   time.Time `json:"createdAt"`
	RedirectUrl string    `json:"redirectUrl"`
	// contains filtered or unexported fields
}

func NewUserSession

func NewUserSession(session *sessions.Session) *UserSession

func UnmarshalSession

func UnmarshalSession(value string) *UserSession

func (*UserSession) Empty

func (s *UserSession) Empty() bool

func (*UserSession) Invalidate

func (s *UserSession) Invalidate(r *http.Request, w http.ResponseWriter) error

func (*UserSession) IsValid

func (s *UserSession) IsValid() bool

func (UserSession) Marshal

func (s UserSession) Marshal() string

func (*UserSession) Oauth2Token

func (s *UserSession) Oauth2Token() *oauth2.Token

func (*UserSession) Save

func (*UserSession) String

func (s *UserSession) String() string

func (*UserSession) Unmarshal

func (s *UserSession) Unmarshal(value string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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