Documentation
¶
Index ¶
- type GetEntriesRequest
- type HistoryClient
- func (c *HistoryClient) GetEntries(req GetEntriesRequest) ([]history.Entry, error)
- func (c *HistoryClient) Login(req LoginRequest) (tokenStr string, err error)
- func (c *HistoryClient) PutEntries(req PutEntriesRequest) (updated int64, err error)
- func (c *HistoryClient) Register(req RegisterRequest) error
- type LoginRequest
- type PutEntriesRequest
- type RegisterRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetEntriesRequest ¶
GetEntriesRequest contains the request params to query for history entries
type HistoryClient ¶
type HistoryClient struct {
// contains filtered or unexported fields
}
HistoryClient provides the client SDK to talk to the HistoryServer
func NewHistoryClient ¶
func NewHistoryClient(remoteURL string, userToken string, timeout int) (*HistoryClient, error)
NewHistoryClient initializes a new HistoryClient
func (*HistoryClient) GetEntries ¶
func (c *HistoryClient) GetEntries(req GetEntriesRequest) ([]history.Entry, error)
GetEntries fetches history events from the server
func (*HistoryClient) Login ¶
func (c *HistoryClient) Login(req LoginRequest) (tokenStr string, err error)
Login logs into the service and retrieves the token for subsequent use
func (*HistoryClient) PutEntries ¶
func (c *HistoryClient) PutEntries(req PutEntriesRequest) (updated int64, err error)
PutEntries sends the history events to the server
func (*HistoryClient) Register ¶
func (c *HistoryClient) Register(req RegisterRequest) error
Register creates an account on the remote service
type LoginRequest ¶
type LoginRequest struct {
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
}
LoginRequest contains user information to register
type PutEntriesRequest ¶
PutEntriesRequest contains the parameters to send history entries
type RegisterRequest ¶
type RegisterRequest struct {
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
}
RegisterRequest contains user information to register
Click to show internal directories.
Click to hide internal directories.