nettaton

package
v0.0.0-...-ae80017 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLenIDZero error occurs when length of id path parameter is zero.
	ErrLenIDZero = fmt.Errorf("length of id path parameter is zero")
	// ErrInvalidQuestionKind error occurs when question kind is invalid.
	ErrInvalidQuestionKind = fmt.Errorf("question kind is invalid")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client allows the caller to interact with the nettaton server.

func NewClient

func NewClient(serverFQDN string) *Client

NewClient creates a *Client using the fully qualified domain name of the server.

func (*Client) AnswerQuestion

func (c *Client) AnswerQuestion(uuid uuid.UUID, answer string) (string, error)

AnswerQuestion submits an answer attempt to the server. The question attempted to be answered is identfied by uuid. The response will indicate if the submitted answer was correct.

func (*Client) CreateQuestion

func (c *Client) CreateQuestion() (string, error)

CreateQuestion creates a question and stores it's uuid server side.

func (*Client) ReadQuestion

func (c *Client) ReadQuestion(uuid uuid.UUID) (string, error)

ReadQuestion retrieves a question by uuid.

type Nexus

type Nexus struct {
	// contains filtered or unexported fields
}

Nexus ...

func NewNexus

func NewNexus(ds datastore) *Nexus

NewNexus ...

func (*Nexus) AnswerQuestion

func (n *Nexus) AnswerQuestion(r *pf.Request) (*pf.Response, error)

AnswerQuestion ...

func (*Nexus) CreateQuestion

func (n *Nexus) CreateQuestion(r *pf.Request) (*pf.Response, error)

CreateQuestion ...

func (*Nexus) ReadQuestion

func (n *Nexus) ReadQuestion(r *pf.Request) (*pf.Response, error)

ReadQuestion ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL