Back to godoc.org
bitbucket.org/drhttp/moesifapi-go

Package moesifapi

v1.0.4-0...-8daa23e
Latest Go to latest

The highest tagged major version is .

Published: Mar 23, 2020 | License: Apache-2.0 | Module: bitbucket.org/drhttp/moesifapi-go

Overview

* moesifapi-go

* moesifapi-go

* moesifapi-go

Index

Constants

const BaseURI string = "https://api.drhttp.com/moesif"

* The base Uri for API calls

const Version string = "1.0.3"

* Version of this lib

Variables

var Config = config{QueueSize: 256}

type API

type API interface {

	/**
	 * Queue Single API Event Call to be created
	 * @param    *models.EventModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueEvent(*models.EventModel) error

	/**
	 * Queue multiple API Events to be added
	 * @param    []*models.EventModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueEvents([]*models.EventModel) error

	/**
	 * Queue Single User to be updated
	 * @param    *models.UserModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueUser(*models.UserModel) error

	/**
	 * Queue multiple Users to be updated
	 * @param    []*models.UserModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueUsers([]*models.UserModel) error

	/**
	 * Queue Single Company to be added
	 * @param    *models.CompanyModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueCompany(*models.CompanyModel) error

	/**
	 * Queue multiple companies to be added
	 * @param    []*models.CompanyModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	QueueCompanies([]*models.CompanyModel) error

	/**
	 * Add Single API Event Call
	 * @param    *models.EventModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	CreateEvent(*models.EventModel) (http.Header, error)

	/**
	 * Add multiple API Events in a single batch (batch size must be less than 250kb)
	 * @param    []*models.EventModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	CreateEventsBatch([]*models.EventModel) (http.Header, error)

	/**
	 * Update a Single User
	 * @param    *models.UserModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	UpdateUser(*models.UserModel) error

	/**
	 * Update multiple Users in a single batch (batch size must be less than 250kb)
	 * @param    []*models.UserModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	UpdateUsersBatch([]*models.UserModel) error

	/**
	 * Get Application configuration
	 * @param    nil        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	GetAppConfig() (*http.Response, error)

	/**
	 * Update a Single Company
	 * @param    *models.CompanyModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	UpdateCompany(*models.CompanyModel) error

	/**
	 * Update multiple companies in a single batch (batch size must be less than 250kb)
	 * @param    []*models.CompanyModel        body     parameter: Required
	 * @return	Returns the  response from the API call
	 */
	UpdateCompaniesBatch([]*models.CompanyModel) error

	Flush()

	Close()
}

* Interface for the Client

func NewAPI

func NewAPI(moesifApplicationId string) API

* Factory for the API interaface returning Client

type Client

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

* Client structure as interface implementation

func NewClient

func NewClient() *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) CreateEvent

func (c *Client) CreateEvent(event *models.EventModel) (http.Header, error)

*

* Add Single API Event Call
* @param    *models.EventModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) CreateEventsBatch

func (c *Client) CreateEventsBatch(events []*models.EventModel) (http.Header, error)

*

* Add multiple API Events in a single batch (batch size must be less than 250kb)
* @param    []*models.EventModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) Flush

func (c *Client) Flush()

func (*Client) GetAppConfig

func (c *Client) GetAppConfig() (*http.Response, error)

*

* Get Application configuration
* @param  nil  parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueCompanies

func (c *Client) QueueCompanies(u []*models.CompanyModel) error

*

* Queue multiple companies to be added
* @param    []*models.UserModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueCompany

func (c *Client) QueueCompany(u *models.CompanyModel) error

*

* Queue Single Company to be added
* @param    *models.CompanyModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueEvent

func (c *Client) QueueEvent(e *models.EventModel) error

*

* Queue Single API Event Call to be created
* @param    *models.EventModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueEvents

func (c *Client) QueueEvents(e []*models.EventModel) error

*

* Queue multiple API Events to be added
* @param    []*models.EventModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueUser

func (c *Client) QueueUser(u *models.UserModel) error

*

* Queue Single User to be updated
* @param    *models.UserModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) QueueUsers

func (c *Client) QueueUsers(u []*models.UserModel) error

*

* Queue multiple Users to be updated
* @param    []*models.UserModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) UpdateCompaniesBatch

func (c *Client) UpdateCompaniesBatch(companies []*models.CompanyModel) error

*

* Update multiple companies in a single batch (batch size must be less than 250kb)
* @param    []*models.CompanyModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) UpdateCompany

func (c *Client) UpdateCompany(company *models.CompanyModel) error

*

* Update a Single Company
* @param    *models.CompanyModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) UpdateUser

func (c *Client) UpdateUser(user *models.UserModel) error

*

* Update a Single User
* @param    *models.UserModel        body     parameter: Required
* @return	Returns the  response from the API call

func (*Client) UpdateUsersBatch

func (c *Client) UpdateUsersBatch(users []*models.UserModel) error

*

* Update multiple Users in a single batch (batch size must be less than 250kb)
* @param    []*models.UserModel        body     parameter: Required
* @return	Returns the  response from the API call

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier