Versions in this module Expand all Collapse all v0 v0.1.0 Mar 27, 2015 Changes in this version + const DefAdminGID + const DefClientGID + const HdrKey + const HdrMAC + const HdrSession + const SuperGID + const Version + var DefaultAdminPass = []byte("password") + func Read(d FileData, path string) error + func Write(d FileData, path string) error + type ACL interface + Lookup func(gorm.DB, uint, uint) bool + type Auth struct + Name string + Password []byte + type ClientSession interface + CheckACL func(gorm.DB, ...ACL) bool + GetGID func() uint + GetName func() string + GetUID func() uint + IsAdmin func() bool + IsSuper func() bool + NextKey func() crypto.Binary + type Config struct + DB gorm.DB + Runtime Runtime + Session Session + Startup Startup + func (c *Config) Decode(data []byte) error + func (c *Config) Encode() ([]byte, error) + func (c *Config) Fatal(values ...interface{}) + func (c *Config) Log(level log.LogLevel, values ...interface{}) + func (c *Config) NewClient() + func (c *Config) NewServer() + func (c *Config) StartLogging() error + func (c *Config) StopLogging() error + type DBSettings struct + Database string + Driver string + File string + Host string + Pass string + Port string + User string + type FileData interface + Decode func([]byte) error + Encode func() ([]byte, error) + type Key struct + Admin string + Client string + GroupPriv []byte + GroupPub []byte + Key []byte + Name string + Path string + Secret []byte + UserKey []byte + type Message struct + Auth Auth + Key Key + Response string + User User + X509 X509 + func ReadResp(r io.Reader) (resp []Message, err error) + func RespMessage(r string) (m Message) + type Pool interface + Validate func(Request) bool + type Request struct + Req Message + Session ClientSession + func (r *Request) Parse(body []byte, resp http.ResponseWriter) bool + func (r *Request) Reply(code int, messages ...Message) + func (r *Request) SetSessionID(id int64) + type Runtime struct + CA *crypto.CertPool + CACert *crypto.TLSCert + CAKey *crypto.TLSKey + Cert *crypto.TLSCert + Key *crypto.TLSKey + Keypair *crypto.Key + Log io.Writer + Password crypto.Binary + ServerCert crypto.Binary + type Server struct + Mux *http.ServeMux + Pool *Pool + func (s *Server) New(cfg *Config) (err error) + func (s *Server) Start() + func (s *Server) Stop() + func (s *Server) Wait() + type Session struct + GroupKey crypto.Binary + Password []byte + ServerCert []byte + func (s *Session) Get(url string) (resp []Message, err error) + func (s *Session) Login(cfg *Config) (err error) + func (s *Session) Logout(cfg *Config) (err error) + func (s *Session) New(cfg *Config) error + func (s *Session) Post(url string, msg Message) (resp []Message, err error) + type Startup struct + Address string + Crypto StartupCrypto + DB DBSettings + Dir string + LogFile string + LogLevel log.LogLevel + NodeName string + type StartupCrypto struct + CACert string + CAKey string + Cert string + Key string + KeyPair string + Password string + ServerCert string + type User struct + Admin bool + Group string + Key []byte + Name string + Password []byte + type X509 struct + Cert []byte + Name string