identity

package module
v0.0.0-...-359fc69 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

Go API client for identity

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.5.0
  • Package version: 1.5.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package in your project folder. When you import, add the following:

import "./identity"

Documentation for API Endpoints

All URIs are relative to https://localhost:443/identity/v1

Class Method HTTP request Description
DefaultApi ConnectPost Post /connect Connect using a fingerprint
DefaultApi ConnectPut Put /connect Reconnect using a fingerprint and an entityID
DefaultApi DisconnectPut Put /disconnect disconnects an entity
DefaultApi LookupBatchPost Post /lookup/batch lookup batch for list of entities, given their entityNames
DefaultApi LookupPost Post /lookup lookup for an entity, given the entityName
DefaultApi RegisterBatchPost Post /register/batch Register integration entities in batch of a max size of 1000 and 1MB
DefaultApi RegisterBatchPut Put /register/batch Re-register integration entities in batch of a max size of 1000 and 1MB
DefaultApi RegisterPost Post /register Register integration entity
DefaultApi RegisterPut Put /register Re-register integration entity

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	DefaultApi *DefaultApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Identity API specifications API v1.5.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type ConnectPostOpts

type ConnectPostOpts struct {
	ContentEncoding optional.String
}

ConnectPostOpts Optional parameters for the method 'ConnectPost'

type ConnectPutOpts

type ConnectPutOpts struct {
	ContentEncoding optional.String
}

ConnectPutOpts Optional parameters for the method 'ConnectPut'

type ConnectRequest

type ConnectRequest struct {
	Fingerprint Fingerprint       `json:"fingerprint"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Source      string            `json:"source,omitempty"`
}

ConnectRequest struct for ConnectRequest

type ConnectResponse

type ConnectResponse struct {
	Identity Identity `json:"identity"`
	Warnings []string `json:"warnings,omitempty"`
}

ConnectResponse struct for ConnectResponse

type DefaultApiService

type DefaultApiService service

DefaultApiService DefaultApi service

func (*DefaultApiService) ConnectPost

func (a *DefaultApiService) ConnectPost(ctx _context.Context, userAgent string, xLicenseKey string, connectRequest ConnectRequest, localVarOptionals *ConnectPostOpts) (ConnectResponse, *_nethttp.Response, error)

ConnectPost Connect using a fingerprint

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param connectRequest
  • @param optional nil or *ConnectPostOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -

@return ConnectResponse

func (*DefaultApiService) ConnectPut

func (a *DefaultApiService) ConnectPut(ctx _context.Context, userAgent string, xLicenseKey string, reconnectRequest ReconnectRequest, localVarOptionals *ConnectPutOpts) (ConnectResponse, *_nethttp.Response, error)

ConnectPut Reconnect using a fingerprint and an entityID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param reconnectRequest
  • @param optional nil or *ConnectPutOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -

@return ConnectResponse

func (*DefaultApiService) DisconnectPut

func (a *DefaultApiService) DisconnectPut(ctx _context.Context, userAgent string, xLicenseKey string, disconnectRequest DisconnectRequest, localVarOptionals *DisconnectPutOpts) (*_nethttp.Response, error)

DisconnectPut disconnects an entity

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param disconnectRequest
  • @param optional nil or *DisconnectPutOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -

func (*DefaultApiService) LookupBatchPost

func (a *DefaultApiService) LookupBatchPost(ctx _context.Context, userAgent string, xLicenseKey string, lookupRequest []LookupRequest, localVarOptionals *LookupBatchPostOpts) ([]map[string]interface{}, *_nethttp.Response, error)

LookupBatchPost lookup batch for list of entities, given their entityNames

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param lookupRequest
  • @param optional nil or *LookupBatchPostOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -

@return []map[string]interface{}

func (*DefaultApiService) LookupPost

func (a *DefaultApiService) LookupPost(ctx _context.Context, userAgent string, xLicenseKey string, lookupRequest LookupRequest, localVarOptionals *LookupPostOpts) (LookupResponse, *_nethttp.Response, error)

LookupPost lookup for an entity, given the entityName

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param lookupRequest
  • @param optional nil or *LookupPostOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -

@return LookupResponse

func (*DefaultApiService) RegisterBatchPost

func (a *DefaultApiService) RegisterBatchPost(ctx _context.Context, userAgent string, xLicenseKey string, registerRequest []RegisterRequest, localVarOptionals *RegisterBatchPostOpts) ([]RegisterBatchEntityResponse, *_nethttp.Response, error)

RegisterBatchPost Register integration entities in batch of a max size of 1000 and 1MB

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param registerRequest
  • @param optional nil or *RegisterBatchPostOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -
  • @param "XNRIAgentEntityId" (optional.Int64) -

@return []RegisterBatchEntityResponse

func (*DefaultApiService) RegisterBatchPut

func (a *DefaultApiService) RegisterBatchPut(ctx _context.Context, userAgent string, xLicenseKey string, reRegisterRequest []ReRegisterRequest, localVarOptionals *RegisterBatchPutOpts) ([]ReRegisterBatchEntityResponse, *_nethttp.Response, error)

RegisterBatchPut Re-register integration entities in batch of a max size of 1000 and 1MB

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param reRegisterRequest
  • @param optional nil or *RegisterBatchPutOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -
  • @param "XNRIAgentEntityId" (optional.Int64) -

@return []ReRegisterBatchEntityResponse

func (*DefaultApiService) RegisterPost

func (a *DefaultApiService) RegisterPost(ctx _context.Context, userAgent string, xLicenseKey string, registerRequest RegisterRequest, localVarOptionals *RegisterPostOpts) (RegisterResponse, *_nethttp.Response, error)

RegisterPost Register integration entity

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param registerRequest
  • @param optional nil or *RegisterPostOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -
  • @param "XNRIAgentEntityId" (optional.Int64) -

@return RegisterResponse

func (*DefaultApiService) RegisterPut

func (a *DefaultApiService) RegisterPut(ctx _context.Context, userAgent string, xLicenseKey string, reRegisterRequest ReRegisterRequest, localVarOptionals *RegisterPutOpts) (ReRegisterResponse, *_nethttp.Response, error)

RegisterPut Re-register integration entity

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userAgent
  • @param xLicenseKey
  • @param reRegisterRequest
  • @param optional nil or *RegisterPutOpts - Optional Parameters:
  • @param "ContentEncoding" (optional.String) -
  • @param "XNRIAgentEntityId" (optional.Int64) -

@return ReRegisterResponse

type DisconnectPutOpts

type DisconnectPutOpts struct {
	ContentEncoding optional.String
}

DisconnectPutOpts Optional parameters for the method 'DisconnectPut'

type DisconnectRequest

type DisconnectRequest struct {
	EntityId int64  `json:"entityId"`
	Reason   string `json:"reason"`
}

DisconnectRequest struct for DisconnectRequest

type Fingerprint

type Fingerprint struct {
	FullHostname    string              `json:"fullHostname,omitempty"`
	Hostname        string              `json:"hostname,omitempty"`
	CloudProviderId string              `json:"cloudProviderId,omitempty"`
	DisplayName     string              `json:"displayName,omitempty"`
	BootId          string              `json:"bootId,omitempty"`
	IpAddresses     map[string][]string `json:"ipAddresses,omitempty"`
	MacAddresses    map[string][]string `json:"macAddresses,omitempty"`
	Type            string              `json:"type,omitempty"`
}

Fingerprint struct for Fingerprint

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type Identity

type Identity struct {
	EntityId int64  `json:"entityId"`
	Guid     string `json:"guid"`
}

Identity struct for Identity

type LookupBatchPostOpts

type LookupBatchPostOpts struct {
	ContentEncoding optional.String
}

LookupBatchPostOpts Optional parameters for the method 'LookupBatchPost'

type LookupPostOpts

type LookupPostOpts struct {
	ContentEncoding optional.String
}

LookupPostOpts Optional parameters for the method 'LookupPost'

type LookupRequest

type LookupRequest struct {
	EntityName string `json:"entityName"`
}

LookupRequest struct for LookupRequest

type LookupResponse

type LookupResponse struct {
	EntityId   int64  `json:"entityId"`
	EntityName string `json:"entityName"`
	Guid       string `json:"guid,omitempty"`
}

LookupResponse struct for LookupResponse

type ReRegisterBatchEntityResponse

type ReRegisterBatchEntityResponse struct {
	EntityId   int64    `json:"entityId,omitempty"`
	EntityName string   `json:"entityName,omitempty"`
	Guid       string   `json:"guid,omitempty"`
	Warnings   []string `json:"warnings,omitempty"`
	Error      string   `json:"error,omitempty"`
}

ReRegisterBatchEntityResponse struct for ReRegisterBatchEntityResponse

type ReRegisterRequest

type ReRegisterRequest struct {
	EntityId    int64             `json:"entityId"`
	EntityName  string            `json:"entityName,omitempty"`
	DisplayName string            `json:"displayName,omitempty"`
	EntityType  string            `json:"entityType,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Source      string            `json:"source,omitempty"`
}

ReRegisterRequest struct for ReRegisterRequest

type ReRegisterResponse

type ReRegisterResponse struct {
	EntityId int64    `json:"entityId"`
	Guid     string   `json:"guid"`
	Warnings []string `json:"warnings,omitempty"`
}

ReRegisterResponse struct for ReRegisterResponse

type ReconnectRequest

type ReconnectRequest struct {
	EntityId    int64             `json:"entityId"`
	Fingerprint Fingerprint       `json:"fingerprint"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Source      string            `json:"source,omitempty"`
}

ReconnectRequest struct for ReconnectRequest

type RegisterBatchEntityResponse

type RegisterBatchEntityResponse struct {
	EntityId   int64    `json:"entityId,omitempty"`
	EntityName string   `json:"entityName"`
	Guid       string   `json:"guid,omitempty"`
	Warnings   []string `json:"warnings,omitempty"`
	Error      string   `json:"error,omitempty"`
}

RegisterBatchEntityResponse struct for RegisterBatchEntityResponse

type RegisterBatchPostOpts

type RegisterBatchPostOpts struct {
	ContentEncoding   optional.String
	XNRIAgentEntityId optional.Int64
}

RegisterBatchPostOpts Optional parameters for the method 'RegisterBatchPost'

type RegisterBatchPutOpts

type RegisterBatchPutOpts struct {
	ContentEncoding   optional.String
	XNRIAgentEntityId optional.Int64
}

RegisterBatchPutOpts Optional parameters for the method 'RegisterBatchPut'

type RegisterPostOpts

type RegisterPostOpts struct {
	ContentEncoding   optional.String
	XNRIAgentEntityId optional.Int64
}

RegisterPostOpts Optional parameters for the method 'RegisterPost'

type RegisterPutOpts

type RegisterPutOpts struct {
	ContentEncoding   optional.String
	XNRIAgentEntityId optional.Int64
}

RegisterPutOpts Optional parameters for the method 'RegisterPut'

type RegisterRequest

type RegisterRequest struct {
	EntityName  string            `json:"entityName"`
	DisplayName string            `json:"displayName,omitempty"`
	EntityType  string            `json:"entityType,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Source      string            `json:"source,omitempty"`
}

RegisterRequest struct for RegisterRequest

type RegisterResponse

type RegisterResponse struct {
	EntityId   int64    `json:"entityId"`
	EntityName string   `json:"entityName"`
	Guid       string   `json:"guid"`
	Warnings   []string `json:"warnings,omitempty"`
}

RegisterResponse struct for RegisterResponse

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

Jump to

Keyboard shortcuts

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