Documentation ¶
Overview ¶
Package rationl is a generated protocol buffer package.
It is generated from these files:
rationl.proto
It has these top-level messages:
User Investigation Experiment
Index ¶
- type DB
- type Experiment
- func (m *Experiment) GetHypothesis() string
- func (m *Experiment) GetID() string
- func (m *Experiment) GetInvestigationID() string
- func (m *Experiment) GetObservation() string
- func (m *Experiment) GetOutcome() string
- func (this *Experiment) GoString() string
- func (m *Experiment) Marshal() (data []byte, err error)
- func (m *Experiment) MarshalTo(data []byte) (n int, err error)
- func (*Experiment) ProtoMessage()
- func (m *Experiment) Reset()
- func (m *Experiment) Size() (n int)
- func (m *Experiment) String() string
- func (m *Experiment) Unmarshal(data []byte) error
- type Investigation
- func (m *Investigation) GetID() string
- func (m *Investigation) GetName() string
- func (m *Investigation) GetUserID() int64
- func (this *Investigation) GoString() string
- func (m *Investigation) Marshal() (data []byte, err error)
- func (m *Investigation) MarshalTo(data []byte) (n int, err error)
- func (*Investigation) ProtoMessage()
- func (m *Investigation) Reset()
- func (m *Investigation) Size() (n int)
- func (m *Investigation) String() string
- func (m *Investigation) Unmarshal(data []byte) error
- type Session
- type Tx
- func (tx *Tx) CreateInvestigation(i *Investigation) error
- func (tx *Tx) FindOrCreateUserByAccessToken(token string) (*User, error)
- func (tx *Tx) GitHubClient(token string) *github.Client
- func (tx *Tx) Investigation(id string) *Investigation
- func (tx *Tx) InvestigationsByUserID(id int64) []*Investigation
- func (tx *Tx) SaveUser(u *User) error
- func (tx *Tx) Session(r *http.Request) *Session
- func (tx *Tx) User(id int64) *User
- type User
- func (m *User) GetAccessToken() string
- func (m *User) GetEmail() string
- func (m *User) GetID() int64
- func (this *User) GoString() string
- func (m *User) Marshal() (data []byte, err error)
- func (m *User) MarshalTo(data []byte) (n int, err error)
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) Size() (n int)
- func (m *User) String() string
- func (m *User) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB represents the primary data storage.
type Experiment ¶
type Experiment struct { ID *string `protobuf:"bytes,1,req" json:"ID,omitempty"` InvestigationID *string `protobuf:"bytes,2,req" json:"InvestigationID,omitempty"` Outcome *string `protobuf:"bytes,3,req" json:"Outcome,omitempty"` Hypothesis *string `protobuf:"bytes,4,req" json:"Hypothesis,omitempty"` Observation *string `protobuf:"bytes,5,req" json:"Observation,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Experiment) GetHypothesis ¶
func (m *Experiment) GetHypothesis() string
func (*Experiment) GetID ¶
func (m *Experiment) GetID() string
func (*Experiment) GetInvestigationID ¶
func (m *Experiment) GetInvestigationID() string
func (*Experiment) GetObservation ¶
func (m *Experiment) GetObservation() string
func (*Experiment) GetOutcome ¶
func (m *Experiment) GetOutcome() string
func (*Experiment) GoString ¶
func (this *Experiment) GoString() string
func (*Experiment) Marshal ¶
func (m *Experiment) Marshal() (data []byte, err error)
func (*Experiment) ProtoMessage ¶
func (*Experiment) ProtoMessage()
func (*Experiment) Reset ¶
func (m *Experiment) Reset()
func (*Experiment) Size ¶
func (m *Experiment) Size() (n int)
func (*Experiment) String ¶
func (m *Experiment) String() string
func (*Experiment) Unmarshal ¶
func (m *Experiment) Unmarshal(data []byte) error
type Investigation ¶
type Investigation struct { ID *string `protobuf:"bytes,1,req" json:"ID,omitempty"` UserID *int64 `protobuf:"varint,2,req" json:"UserID,omitempty"` Name *string `protobuf:"bytes,4,req" json:"Name,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Investigation) GetID ¶
func (m *Investigation) GetID() string
func (*Investigation) GetName ¶
func (m *Investigation) GetName() string
func (*Investigation) GetUserID ¶
func (m *Investigation) GetUserID() int64
func (*Investigation) GoString ¶
func (this *Investigation) GoString() string
func (*Investigation) Marshal ¶
func (m *Investigation) Marshal() (data []byte, err error)
func (*Investigation) ProtoMessage ¶
func (*Investigation) ProtoMessage()
func (*Investigation) Reset ¶
func (m *Investigation) Reset()
func (*Investigation) Size ¶
func (m *Investigation) Size() (n int)
func (*Investigation) String ¶
func (m *Investigation) String() string
func (*Investigation) Unmarshal ¶
func (m *Investigation) Unmarshal(data []byte) error
type Session ¶
Session represents an authenticated session.
func (*Session) Authenticated ¶
Authenticated returns true if there is a user attached to the session.
type Tx ¶
Tx represents a transaction.
func (*Tx) CreateInvestigation ¶
func (tx *Tx) CreateInvestigation(i *Investigation) error
CreateInvestigation creates a new investigation.
func (*Tx) FindOrCreateUserByAccessToken ¶
FindOrCreateUserByAccessToken retrieves or creates a new user based on an access token provided by GitHub.
func (*Tx) GitHubClient ¶
GitHubClient returns an instance of the GitHub client for a given access token.
func (*Tx) Investigation ¶
func (tx *Tx) Investigation(id string) *Investigation
Investigation retrieves an investigation from the database by ID.
func (*Tx) InvestigationsByUserID ¶
func (tx *Tx) InvestigationsByUserID(id int64) []*Investigation
InvestigationsByUserID retrieves a list of investigations by user id.
type User ¶
type User struct { ID *int64 `protobuf:"varint,1,req" json:"ID,omitempty"` Email *string `protobuf:"bytes,3,req" json:"Email,omitempty"` AccessToken *string `protobuf:"bytes,4,req" json:"AccessToken,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*User) GetAccessToken ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()