Files
play-with-docker/pwd/types/session.go
Jonathan Leibiusky @xetorthio 954c52471b Refactor storage to support shallow types.
Add Client to storage.
Fix client resizing issues.
2017-09-01 20:12:19 -03:00

28 lines
588 B
Go

package types
import (
"sync"
"time"
)
type Session struct {
Id string `json:"id" bson:"id"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
PwdIpAddress string `json:"pwd_ip_address"`
Ready bool `json:"ready"`
Stack string `json:"stack"`
StackName string `json:"stack_name"`
ImageName string `json:"image_name"`
Host string `json:"host"`
rw sync.Mutex `json:"-"`
}
func (s *Session) Lock() {
s.rw.Lock()
}
func (s *Session) Unlock() {
s.rw.Unlock()
}