Files
play-with-docker/pwd/types/session.go
Jonathan Leibiusky 3f5b3882dd Multiple playgrounds support (#215)
* Add Playground struct and basic support for creating it and retrieving
it

* Add missing functions in pwd mock

* Get playground from request domain and validate it exists. If valid set
it on the newly created session.

* Move playground specific configurations to the playground struct and use
it everytime we need that conf.

* Don't allow to specify a duration bigger that the allowed in the
playground
2017-11-14 15:50:04 -03:00

20 lines
701 B
Go

package types
import (
"time"
)
type Session struct {
Id string `json:"id" bson:"id"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
ExpiresAt time.Time `json:"expires_at" bson:"expires_at"`
PwdIpAddress string `json:"pwd_ip_address" bson:"pwd_ip_address"`
Ready bool `json:"ready" bson:"ready"`
Stack string `json:"stack" bson:"stack"`
StackName string `json:"stack_name" bson:"stack_name"`
ImageName string `json:"image_name" bson:"image_name"`
Host string `json:"host" bson:"host"`
UserId string `json:"user_id" bson:"user_id"`
PlaygroundId string `json:"playground_id" bson:"playground_id"`
}