uuidgen

package
v0.0.0-...-d2ba568 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(url string, apiKey string) (*Client, error)

func (*Client) GetStats

func (c *Client) GetStats() (*Stats, error)

func (*Client) GetUUID

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

func (*Client) GetVersion

func (c *Client) GetVersion() (*piazza.Version, error)

func (*Client) PostUuids

func (c *Client) PostUuids(count int) (*[]string, error)

type IClient

type IClient interface {
	// high-level interfaces
	GetUUID() (string, error)

	// low-level interfaces
	PostUuids(count int) (*[]string, error)
	GetStats() (*Stats, error)
	GetVersion() (*piazza.Version, error)
}

type Kit

type Kit struct {
	Service       *Service
	Server        *Server
	LogWriter     pzsyslog.Writer
	AuditWriter   pzsyslog.Writer
	Sys           *piazza.SystemConfig
	GenericServer *piazza.GenericServer
	Url           string
	// contains filtered or unexported fields
}

func NewKit

func NewKit(sys *piazza.SystemConfig, logWriter pzsyslog.Writer, auditWriter pzsyslog.Writer) (*Kit, error)

func (*Kit) Start

func (kit *Kit) Start() error

func (*Kit) Stop

func (kit *Kit) Stop() error

func (*Kit) Wait

func (kit *Kit) Wait() error

type MockClient

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

func NewMockClient

func NewMockClient() (*MockClient, error)

func (*MockClient) GetStats

func (c *MockClient) GetStats() (*Stats, error)

func (*MockClient) GetUUID

func (c *MockClient) GetUUID() (string, error)

func (*MockClient) GetVersion

func (c *MockClient) GetVersion() (*piazza.Version, error)

func (*MockClient) PostUuids

func (c *MockClient) PostUuids(count int) (*[]string, error)

type Server

type Server struct {
	Routes []piazza.RouteData
	// contains filtered or unexported fields
}

func (*Server) Init

func (server *Server) Init(service *Service) error

type Service

type Service struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Service) GetStats

func (service *Service) GetStats() *piazza.JsonResponse

func (*Service) Init

func (service *Service) Init(sys *piazza.SystemConfig, logWriter pzsyslog.Writer, auditWriter pzsyslog.Writer) error

func (*Service) PostUuids

func (service *Service) PostUuids(params *piazza.HttpQueryParams) *piazza.JsonResponse

PostUuids generates one or more UUIDs.

The request body is ignored. We allow a count of zero, for testing.

type Stats

type Stats struct {
	NumUUIDs    int       `json:"numUuids"`
	NumRequests int       `json:"numRequests"`
	CreatedOn   time.Time `json:"createdOn"`
}

Jump to

Keyboard shortcuts

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