kbapi

package
v0.0.0-...-c16bbbf Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	KibanaSpaces         *KibanaSpacesAPI
	KibanaRoleManagement *KibanaRoleManagementAPI
	KibanaDashboard      *KibanaDashboardAPI
	KibanaSavedObject    *KibanaSavedObjectAPI
	KibanaStatus         *KibanaStatusAPI
}

func New

func New(c *resty.Client) *API

type APIError

type APIError struct {
	Code    int
	Message string
}

func NewAPIError

func NewAPIError(code int, message string, params ...interface{}) APIError

func (APIError) Error

func (e APIError) Error() string

type KibanaDashboardAPI

type KibanaDashboardAPI struct {
	Export KibanaDashboardExport
	Import KibanaDashboardImport
}

type KibanaDashboardExport

type KibanaDashboardExport func(listID []string) (map[string]interface{}, error)

type KibanaDashboardImport

type KibanaDashboardImport func(data map[string]interface{}, listExcludeType []string, force bool) error

type KibanaRole

type KibanaRole struct {
	Name            string                       `json:"name,omitempty"`
	Metadata        map[string]interface{}       `json:"metadata,omitempty"`
	TransientMedata *KibanaRoleTransientMetadata `json:"transient_metadata,omitempty"`
	Elasticsearch   *KibanaRoleElasticsearch     `json:"elasticsearch,omitempty"`
	Kibana          []KibanaRoleKibana           `json:"kibana,omitempty"`
}

Kibana role management object

func (*KibanaRole) String

func (k *KibanaRole) String() string

type KibanaRoleElasticsearch

type KibanaRoleElasticsearch struct {
	Indices []KibanaRoleElasticsearchIndice `json:"indices,omitempty"`
	Cluster []string                        `json:"cluster,omitempty"`
	RunAs   []string                        `json:"run_as,omitempty"`
}

type KibanaRoleElasticsearchIndice

type KibanaRoleElasticsearchIndice struct {
	Names         []string               `json:"names,omitempty"`
	Privileges    []string               `json:"privileges,omitempty"`
	FieldSecurity map[string]interface{} `json:"field_security,omitempty"`
	Query         interface{}            `json:"query,omitempty"`
}

type KibanaRoleKibana

type KibanaRoleKibana struct {
	Base    []string            `json:"base,omitempty"`
	Feature map[string][]string `json:"feature,omitempty"`
	Spaces  []string            `json:"spaces,omitempty"`
}

type KibanaRoleManagementCreateOrUpdate

type KibanaRoleManagementCreateOrUpdate func(kibanaRole *KibanaRole) (*KibanaRole, error)

type KibanaRoleManagementDelete

type KibanaRoleManagementDelete func(name string) error

type KibanaRoleManagementGet

type KibanaRoleManagementGet func(name string) (*KibanaRole, error)

type KibanaRoleManagementList

type KibanaRoleManagementList func() (KibanaRoles, error)

type KibanaRoleTransientMetadata

type KibanaRoleTransientMetadata struct {
	Enabled bool `json:"enabled,omitempty"`
}

type KibanaRoles

type KibanaRoles []KibanaRole

List of KibanaRole objects

type KibanaSavedObjectCreate

type KibanaSavedObjectCreate func(data map[string]interface{}, objectType string, id string, overwrite bool) (map[string]interface{}, error)

type KibanaSavedObjectDelete

type KibanaSavedObjectDelete func(objectType string, id string) error

type KibanaSavedObjectExport

type KibanaSavedObjectExport func(objectTypes []string, objects []map[string]string, deepReference bool) (map[string]interface{}, error)

type KibanaSavedObjectFind

type KibanaSavedObjectFind func(objectType string, optionalParameters *OptionalFindParameters) (map[string]interface{}, error)

type KibanaSavedObjectGet

type KibanaSavedObjectGet func(objectType string, id string) (map[string]interface{}, error)

type KibanaSavedObjectImport

type KibanaSavedObjectImport func(data []byte, overwrite bool) (map[string]interface{}, error)

type KibanaSavedObjectUpdate

type KibanaSavedObjectUpdate func(data map[string]interface{}, objectType string, id string) (map[string]interface{}, error)

type KibanaSpace

type KibanaSpace struct {
	ID               string   `json:"id"`
	Name             string   `json:"name"`
	Description      string   `json:"description,omitempty"`
	DisabledFeatures []string `json:"disabledFeatures,omitempty"`
	Reserved         bool     `json:"_reserved,omitempty"`
	Initials         string   `json:"initials,omitempty"`
	Color            string   `json:"color,omitempty"`
}

Kibana space object

func (*KibanaSpace) String

func (k *KibanaSpace) String() string

type KibanaSpaceCopySavedObjectParameter

type KibanaSpaceCopySavedObjectParameter struct {
	Spaces            []string                     `json:"spaces"`
	IncludeReferences bool                         `json:"includeReferences"`
	Overwrite         bool                         `json:"overwrite"`
	Objects           []KibanaSpaceObjectParameter `json:"objects"`
}

Parameter to copy saved object on user space

type KibanaSpaceCopySavedObjects

type KibanaSpaceCopySavedObjects func(parameter *KibanaSpaceCopySavedObjectParameter, spaceOrigin string) error

type KibanaSpaceCreate

type KibanaSpaceCreate func(kibanaSpace *KibanaSpace) (*KibanaSpace, error)

type KibanaSpaceDelete

type KibanaSpaceDelete func(id string) error

type KibanaSpaceGet

type KibanaSpaceGet func(id string) (*KibanaSpace, error)

type KibanaSpaceList

type KibanaSpaceList func() (KibanaSpaces, error)

type KibanaSpaceObjectParameter

type KibanaSpaceObjectParameter struct {
	Type string `json:"type"`
	Id   string `json:"id"`
}

type KibanaSpaceUpdate

type KibanaSpaceUpdate func(kibanaSpace *KibanaSpace) (*KibanaSpace, error)

type KibanaSpaces

type KibanaSpaces []KibanaSpace

List of KibanaSpace objects

type KibanaSpacesAPI

type KibanaSpacesAPI struct {
	Get              KibanaSpaceGet
	List             KibanaSpaceList
	Create           KibanaSpaceCreate
	Delete           KibanaSpaceDelete
	Update           KibanaSpaceUpdate
	CopySavedObjects KibanaSpaceCopySavedObjects
}

KibanaSpaces contain the Kibana spaces API

type KibanaStatus

type KibanaStatus map[string]interface{}

type KibanaStatusAPI

type KibanaStatusAPI struct {
	Get KibanaStatusGet
}

type KibanaStatusGet

type KibanaStatusGet func() (KibanaStatus, error)

type OptionalFindParameters

type OptionalFindParameters struct {
	ObjectsPerPage        int
	Page                  int
	Search                string
	DefaultSearchOperator string
	SearchFields          []string
	Fields                []string
	SortField             string
	HasReference          string
}

Jump to

Keyboard shortcuts

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