Documentation ¶
Index ¶
- Constants
- func GetEnvVarOrDefault(key string, defaultValue string) string
- func RunTestsWithContainers(m *testing.M, client *KibanaClient)
- func RunTestsWithoutContainers(m *testing.M)
- type Auth0Response
- type AuthenticationHandler
- type BasicAuthenticationHandler
- type Config
- type CreateDashboardRequest
- type CreateSearchRequest
- type CreateVisualizationRequest
- type Dashboard
- type DashboardAttributes
- type DashboardClient
- type DashboardReferences
- type DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) Build() (*CreateDashboardRequest, error)
- func (builder *DashboardRequestBuilder) WithDescription(description string) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithKibanaSavedObjectMeta(meta *SearchKibanaSavedObjectMeta) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithOptionsJson(optionsJson string) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithPanelsJson(panelsJson string) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithReferences(refs []*DashboardReferences) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithTimeRestore(timeRestore bool) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithTitle(title string) *DashboardRequestBuilder
- func (builder *DashboardRequestBuilder) WithUiStateJson(uiStateJson string) *DashboardRequestBuilder
- type DefaultRoleClient
- type DefaultSpaceClient
- type HttpAgent
- func (authClient *HttpAgent) Auth(handler AuthenticationHandler) *HttpAgent
- func (authClient *HttpAgent) Delete(targetUrl string) *HttpAgent
- func (authClient *HttpAgent) End(callback ...func(response gorequest.Response, body string, errs []error)) (gorequest.Response, string, []error)
- func (authClient *HttpAgent) Get(targetUrl string) *HttpAgent
- func (authClient *HttpAgent) Post(targetUrl string) *HttpAgent
- func (authClient *HttpAgent) Put(targetUrl string) *HttpAgent
- func (authClient *HttpAgent) Query(content interface{}) *HttpAgent
- func (authClient *HttpAgent) Send(content interface{}) *HttpAgent
- func (authClient *HttpAgent) Set(param string, value string) *HttpAgent
- func (authClient *HttpAgent) SetLogger(logger *log.Logger) *HttpAgent
- type HttpError
- type IndexPattern
- type IndexPatternAttributes
- type IndexPatternClient
- type IndexPatternClient553
- type IndexPatternClient600
- type IndexPatternCreateResult
- type IndexPatternCreateResult553
- type KibanaClient
- func (kibanaClient *KibanaClient) ChangeAccount(accountId string) error
- func (kibanaClient *KibanaClient) Dashboard() DashboardClient
- func (kibanaClient *KibanaClient) IndexPattern() IndexPatternClient
- func (kibanaClient *KibanaClient) Role() RoleClient
- func (kibanaClient *KibanaClient) SavedObjects() SavedObjectsClient
- func (kibanaClient *KibanaClient) Search() SearchClient
- func (kibanaClient *KibanaClient) SetAuth(handler AuthenticationHandler) *KibanaClient
- func (kibanaClient *KibanaClient) SetLogger(logger *log.Logger) *KibanaClient
- func (kibanaClient *KibanaClient) Space() SpaceClient
- func (kibanaClient *KibanaClient) Visualization() VisualizationClient
- type KibanaType
- type LogzAuthenticationHandler
- type NoAuthenticationHandler
- type Role
- type RoleClient
- type RoleElasticSearch
- type RoleKibana
- type SavedObject
- type SavedObjectRequest
- type SavedObjectRequestBuilder
- func (builder *SavedObjectRequestBuilder) Build() *SavedObjectRequest
- func (builder *SavedObjectRequestBuilder) WithFields(fields []string) *SavedObjectRequestBuilder
- func (builder *SavedObjectRequestBuilder) WithPerPage(perPage int) *SavedObjectRequestBuilder
- func (builder *SavedObjectRequestBuilder) WithType(objectType string) *SavedObjectRequestBuilder
- type SavedObjectResponse
- type SavedObjectsClient
- type Search
- type SearchAttributes
- type SearchClient
- type SearchFilter
- type SearchFilterExists
- type SearchFilterMetaData
- type SearchFilterQuery
- type SearchFilterQueryAttributes
- type SearchKibanaSavedObjectMeta
- type SearchQuery553
- type SearchQuery600
- type SearchReferences
- type SearchRequestBuilder
- func (builder *SearchRequestBuilder) Build() (*CreateSearchRequest, error)
- func (builder *SearchRequestBuilder) WithDescription(description string) *SearchRequestBuilder
- func (builder *SearchRequestBuilder) WithDisplayColumns(columns []string) *SearchRequestBuilder
- func (builder *SearchRequestBuilder) WithReferences(refs []*SearchReferences) *SearchRequestBuilder
- func (builder *SearchRequestBuilder) WithSearchSource(searchSource *SearchSource) *SearchRequestBuilder
- func (builder *SearchRequestBuilder) WithSortColumns(columns []string, order SortOrder) *SearchRequestBuilder
- func (builder *SearchRequestBuilder) WithTitle(title string) *SearchRequestBuilder
- type SearchSource
- type SearchSourceBuilder
- type SearchSourceBuilderFactory
- type Sort
- type SortOrder
- type Space
- type SpaceClient
- type UpdateDashboardRequest
- type UpdateSearchRequest
- type UpdateVisualizationRequest
- type Visualization
- type VisualizationAttributes
- type VisualizationClient
- type VisualizationReferences
- type VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) Build(version string) (*CreateVisualizationRequest, error)
- func (builder *VisualizationRequestBuilder) WithDescription(description string) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithKibanaSavedObjectMeta(meta *SearchKibanaSavedObjectMeta) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithReferences(refs []*VisualizationReferences) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithSavedSearchId(savedSearchId string) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithSavedSearchRefName(savedSearchRefName string) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithTitle(title string) *VisualizationRequestBuilder
- func (builder *VisualizationRequestBuilder) WithVisualizationState(visualizationState string) *VisualizationRequestBuilder
Constants ¶
const ( DashboardReferencesTypeSearch dashboardReferencesType = "search" DashboardReferencesTypeVisualization dashboardReferencesType = "visualization" )
Enums for DashboardReferencesType
const ( VisualizationReferencesTypeSearch visualizationReferencesType = "search" VisualizationReferencesTypeIndexPattern visualizationReferencesType = "index-pattern" )
const DefaultElasticSearchPath = "/es_admin/.kibana"
const DefaultKibanaIndexId = "logstash-*"
const DefaultKibanaIndexIdLogzio = "[logzioCustomerIndex]YYMMDD"
const DefaultKibanaUri = "http://localhost:5601"
const DefaultKibanaVersion = DefaultKibanaVersion6
const DefaultKibanaVersion553 = "5.5.3"
const DefaultKibanaVersion6 = "6.0.0"
const DefaultKibanaVersion7 = "7.3.1"
const DefaultLogzioClientId = "kydHH8LqsLR6D6d2dlHTpPEdf0Bztz4c"
const DefaultLogzioVersion = "6.3.2"
const EnvElasticSearchPath = "ELASTIC_SEARCH_PATH"
const EnvKibanaDebug = "KIBANA_DEBUG"
const EnvKibanaIndexId = "KIBANA_INDEX_ID"
const EnvKibanaPassword = "KIBANA_PASSWORD"
const EnvKibanaType = "KIBANA_TYPE"
const EnvKibanaUri = "KIBANA_URI"
const EnvKibanaUserName = "KIBANA_USERNAME"
const EnvKibanaVersion = "ELK_VERSION"
const EnvLogzClientId = "LOGZ_CLIENT_ID"
const EnvLogzMfaSecret = "LOGZ_MFA_SECRET"
const EnvLogzURL = "LOGZ_URL"
const (
SearchReferencesTypeIndexPattern searchReferencesType = "index-pattern"
)
Enums for searchReferencesType
Variables ¶
This section is empty.
Functions ¶
func GetEnvVarOrDefault ¶
func RunTestsWithContainers ¶
func RunTestsWithContainers(m *testing.M, client *KibanaClient)
Types ¶
type Auth0Response ¶
type AuthenticationHandler ¶
type BasicAuthenticationHandler ¶
type BasicAuthenticationHandler struct {
// contains filtered or unexported fields
}
func NewBasicAuthentication ¶
func NewBasicAuthentication(userName string, password string) *BasicAuthenticationHandler
func (*BasicAuthenticationHandler) ChangeAccount ¶
func (auth *BasicAuthenticationHandler) ChangeAccount(accountId string, agent *HttpAgent) error
func (*BasicAuthenticationHandler) Initialize ¶
func (auth *BasicAuthenticationHandler) Initialize(agent *gorequest.SuperAgent) error
type Config ¶
type Config struct { Debug bool DefaultIndexId string ElasticSearchPath string KibanaBaseUri string KibanaVersion string KibanaType KibanaType Insecure bool }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
func (*Config) BuildFullPath ¶
type CreateDashboardRequest ¶
type CreateDashboardRequest struct { Attributes *DashboardAttributes `json:"attributes"` References []*DashboardReferences `json:"references,omitempty"` }
type CreateSearchRequest ¶
type CreateSearchRequest struct { Attributes *SearchAttributes `json:"attributes"` References []*SearchReferences `json:"references,omitempty"` }
type CreateVisualizationRequest ¶
type CreateVisualizationRequest struct { Attributes *VisualizationAttributes `json:"attributes"` References []*VisualizationReferences `json:"references,omitempty"` }
type Dashboard ¶
type Dashboard struct { Id string `json:"id"` Type string `json:"type"` Version version `json:"version"` Attributes *DashboardAttributes `json:"attributes"` References []*DashboardReferences `json:"references,omitempty"` }
type DashboardAttributes ¶
type DashboardAttributes struct { Title string `json:"title"` Description string `json:"description"` Version int `json:"version"` PanelsJson string `json:"panelsJSON"` OptionsJson string `json:"optionsJSON"` UiStateJSON string `json:"uiStateJSON,omitempty"` TimeRestore bool `json:"timeRestore"` KibanaSavedObjectMeta *SearchKibanaSavedObjectMeta `json:"kibanaSavedObjectMeta"` }
type DashboardClient ¶
type DashboardReferences ¶
type DashboardRequestBuilder ¶
type DashboardRequestBuilder struct {
// contains filtered or unexported fields
}
func NewDashboardRequestBuilder ¶
func NewDashboardRequestBuilder() *DashboardRequestBuilder
func (*DashboardRequestBuilder) Build ¶
func (builder *DashboardRequestBuilder) Build() (*CreateDashboardRequest, error)
func (*DashboardRequestBuilder) WithDescription ¶
func (builder *DashboardRequestBuilder) WithDescription(description string) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithKibanaSavedObjectMeta ¶
func (builder *DashboardRequestBuilder) WithKibanaSavedObjectMeta(meta *SearchKibanaSavedObjectMeta) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithOptionsJson ¶
func (builder *DashboardRequestBuilder) WithOptionsJson(optionsJson string) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithPanelsJson ¶
func (builder *DashboardRequestBuilder) WithPanelsJson(panelsJson string) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithReferences ¶
func (builder *DashboardRequestBuilder) WithReferences(refs []*DashboardReferences) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithTimeRestore ¶
func (builder *DashboardRequestBuilder) WithTimeRestore(timeRestore bool) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithTitle ¶
func (builder *DashboardRequestBuilder) WithTitle(title string) *DashboardRequestBuilder
func (*DashboardRequestBuilder) WithUiStateJson ¶
func (builder *DashboardRequestBuilder) WithUiStateJson(uiStateJson string) *DashboardRequestBuilder
type DefaultRoleClient ¶
type DefaultRoleClient struct {
// contains filtered or unexported fields
}
DefaultRoleClient structure to enable operations on Roles implements RoleClient
func (*DefaultRoleClient) CreateOrUpdate ¶
func (api *DefaultRoleClient) CreateOrUpdate(request *Role) error
CreateOrUpdate creates or updates a role based on https://www.elastic.co/guide/en/kibana/current/role-management-api-put.html
func (*DefaultRoleClient) Delete ¶
func (api *DefaultRoleClient) Delete(id string) error
Delete an existing Role based on https://www.elastic.co/guide/en/kibana/current/role-management-api-delete.html
func (*DefaultRoleClient) GetByID ¶
func (api *DefaultRoleClient) GetByID(id string) (*Role, error)
GetByID fetch an existing role https://www.elastic.co/guide/en/kibana/current/role-management-api-get.html
type DefaultSpaceClient ¶
type DefaultSpaceClient struct {
// contains filtered or unexported fields
}
DefaultSpaceClient structure to enable operations on Spaces implements SpaceClient
func (*DefaultSpaceClient) Create ¶
func (api *DefaultSpaceClient) Create(request *Space) error
Create creates a space based on https://www.elastic.co/guide/en/kibana/current/spaces-api-post.html
func (*DefaultSpaceClient) Delete ¶
func (api *DefaultSpaceClient) Delete(id string) error
Delete an existing space based on https://www.elastic.co/guide/en/kibana/master/spaces-api-delete.html
func (*DefaultSpaceClient) GetByID ¶
func (api *DefaultSpaceClient) GetByID(id string) (*Space, error)
GetByID fetch an existing space https://www.elastic.co/guide/en/kibana/master/spaces-api-get.html
func (*DefaultSpaceClient) Update ¶
func (api *DefaultSpaceClient) Update(request *Space) error
Update updates a space based on https://www.elastic.co/guide/en/kibana/master/spaces-api-put.html
type HttpAgent ¶
type HttpAgent struct {
// contains filtered or unexported fields
}
func NewHttpAgent ¶
func NewHttpAgent(config *Config, authHandler AuthenticationHandler) *HttpAgent
func (*HttpAgent) Auth ¶
func (authClient *HttpAgent) Auth(handler AuthenticationHandler) *HttpAgent
type IndexPattern ¶
type IndexPattern struct {
Attributes *IndexPatternAttributes `json:"attributes"`
}
type IndexPatternAttributes ¶
type IndexPatternClient ¶
type IndexPatternClient553 ¶
type IndexPatternClient553 struct {
// contains filtered or unexported fields
}
func (*IndexPatternClient553) Create ¶
func (api *IndexPatternClient553) Create(name string) (*IndexPatternCreateResult, error)
func (*IndexPatternClient553) RefreshFields ¶
func (api *IndexPatternClient553) RefreshFields(indexPatternId string) error
func (*IndexPatternClient553) SetDefault ¶
func (api *IndexPatternClient553) SetDefault(indexPatternId string) error
type IndexPatternClient600 ¶
type IndexPatternClient600 struct {
// contains filtered or unexported fields
}
func (*IndexPatternClient600) Create ¶
func (api *IndexPatternClient600) Create(name string) (*IndexPatternCreateResult, error)
func (*IndexPatternClient600) RefreshFields ¶
func (api *IndexPatternClient600) RefreshFields(indexPatternId string) error
func (*IndexPatternClient600) SetDefault ¶
func (api *IndexPatternClient600) SetDefault(indexPatternId string) error
type IndexPatternCreateResult ¶
type IndexPatternCreateResult struct { Id string `json:"id"` Type string `json:"type"` Version version `json:"version"` Attributes *IndexPatternAttributes `json:"attributes"` }
type KibanaClient ¶
type KibanaClient struct { Config *Config // contains filtered or unexported fields }
func DefaultTestKibanaClient ¶
func DefaultTestKibanaClient() *KibanaClient
func NewClient ¶
func NewClient(config *Config) *KibanaClient
func (*KibanaClient) ChangeAccount ¶
func (kibanaClient *KibanaClient) ChangeAccount(accountId string) error
func (*KibanaClient) Dashboard ¶
func (kibanaClient *KibanaClient) Dashboard() DashboardClient
func (*KibanaClient) IndexPattern ¶
func (kibanaClient *KibanaClient) IndexPattern() IndexPatternClient
func (*KibanaClient) Role ¶
func (kibanaClient *KibanaClient) Role() RoleClient
func (*KibanaClient) SavedObjects ¶
func (kibanaClient *KibanaClient) SavedObjects() SavedObjectsClient
func (*KibanaClient) Search ¶
func (kibanaClient *KibanaClient) Search() SearchClient
func (*KibanaClient) SetAuth ¶
func (kibanaClient *KibanaClient) SetAuth(handler AuthenticationHandler) *KibanaClient
func (*KibanaClient) SetLogger ¶
func (kibanaClient *KibanaClient) SetLogger(logger *log.Logger) *KibanaClient
func (*KibanaClient) Space ¶
func (kibanaClient *KibanaClient) Space() SpaceClient
func (*KibanaClient) Visualization ¶
func (kibanaClient *KibanaClient) Visualization() VisualizationClient
type KibanaType ¶
type KibanaType int
const ( KibanaTypeUnknown KibanaType = iota KibanaTypeVanilla KibanaTypeLogzio )
func ParseKibanaType ¶
func ParseKibanaType(value string) KibanaType
func (KibanaType) String ¶
func (i KibanaType) String() string
type LogzAuthenticationHandler ¶
type LogzAuthenticationHandler struct { Auth0Uri string LogzUri string UserName string Password string ClientId string MfaSecret string // contains filtered or unexported fields }
func NewLogzAuthenticationHandler ¶
func NewLogzAuthenticationHandler(agent *gorequest.SuperAgent) *LogzAuthenticationHandler
func (*LogzAuthenticationHandler) ChangeAccount ¶
func (auth *LogzAuthenticationHandler) ChangeAccount(accountId string, agent *HttpAgent) error
func (*LogzAuthenticationHandler) Initialize ¶
func (auth *LogzAuthenticationHandler) Initialize(agent *gorequest.SuperAgent) error
type NoAuthenticationHandler ¶
type NoAuthenticationHandler struct { }
func (*NoAuthenticationHandler) ChangeAccount ¶
func (auth *NoAuthenticationHandler) ChangeAccount(accountId string, agent *HttpAgent) error
func (*NoAuthenticationHandler) Initialize ¶
func (auth *NoAuthenticationHandler) Initialize(agent *gorequest.SuperAgent) error
type Role ¶
type Role struct { Name string `json:"name,omitempty"` Metadata map[string]interface{} `json:"metadata"` TransientMetadata map[string]interface{} `json:"transient_metadata,omitempty"` ElasticSearch *RoleElasticSearch `json:"elasticsearch"` Kibana []*RoleKibana `json:"kibana"` }
Role is the api definition of a role in kibana can be used to create and get a role
type RoleClient ¶
type RoleClient interface { CreateOrUpdate(request *Role) error GetByID(id string) (*Role, error) Delete(id string) error }
RoleClient declares the required methods to implement to be a client and manage roles
type RoleElasticSearch ¶
type RoleKibana ¶
type SavedObject ¶
type SavedObjectRequest ¶
type SavedObjectRequestBuilder ¶
type SavedObjectRequestBuilder struct {
// contains filtered or unexported fields
}
func NewSavedObjectRequestBuilder ¶
func NewSavedObjectRequestBuilder() *SavedObjectRequestBuilder
func (*SavedObjectRequestBuilder) Build ¶
func (builder *SavedObjectRequestBuilder) Build() *SavedObjectRequest
func (*SavedObjectRequestBuilder) WithFields ¶
func (builder *SavedObjectRequestBuilder) WithFields(fields []string) *SavedObjectRequestBuilder
func (*SavedObjectRequestBuilder) WithPerPage ¶
func (builder *SavedObjectRequestBuilder) WithPerPage(perPage int) *SavedObjectRequestBuilder
func (*SavedObjectRequestBuilder) WithType ¶
func (builder *SavedObjectRequestBuilder) WithType(objectType string) *SavedObjectRequestBuilder
type SavedObjectResponse ¶
type SavedObjectResponse struct { Page int `json:"page"` PerPage int `json:"per_page"` Total int `json:"total"` SavedObjects []*SavedObject `json:"saved_objects"` }
type SavedObjectsClient ¶
type SavedObjectsClient interface {
GetByType(request *SavedObjectRequest) (*SavedObjectResponse, error)
}
type Search ¶
type Search struct { Id string `json:"id"` Type string `json:"type"` Version version `json:"version"` Attributes *SearchAttributes `json:"attributes"` References []*SearchReferences `json:"references,omitempty"` }
type SearchAttributes ¶
type SearchClient ¶
type SearchFilter ¶
type SearchFilter struct { Query *SearchFilterQuery `json:"query"` Exists *SearchFilterExists `json:"exists"` Meta *SearchFilterMetaData `json:"meta,omitempty"` }
type SearchFilterExists ¶
type SearchFilterExists struct {
Field string `json:"field"`
}
type SearchFilterMetaData ¶
type SearchFilterMetaData struct { Index string `json:"index"` IndexRefName string `json:"indexRefName"` Negate bool `json:"negate"` Disabled bool `json:"disabled"` Alias string `json:"alias"` Type string `json:"type"` Key string `json:"key"` Value string `json:"value"` Params *SearchFilterQueryAttributes `json:"params"` }
type SearchFilterQuery ¶
type SearchFilterQuery struct {
Match map[string]*SearchFilterQueryAttributes `json:"match"`
}
type SearchKibanaSavedObjectMeta ¶
type SearchKibanaSavedObjectMeta struct {
SearchSourceJSON string `json:"searchSourceJSON"`
}
type SearchQuery553 ¶
type SearchQuery553 struct {
QueryString *searchQueryString `json:"query_string"`
}
type SearchQuery600 ¶
type SearchReferences ¶
type SearchRequestBuilder ¶
type SearchRequestBuilder struct {
// contains filtered or unexported fields
}
func NewSearchRequestBuilder ¶
func NewSearchRequestBuilder() *SearchRequestBuilder
func (*SearchRequestBuilder) Build ¶
func (builder *SearchRequestBuilder) Build() (*CreateSearchRequest, error)
func (*SearchRequestBuilder) WithDescription ¶
func (builder *SearchRequestBuilder) WithDescription(description string) *SearchRequestBuilder
func (*SearchRequestBuilder) WithDisplayColumns ¶
func (builder *SearchRequestBuilder) WithDisplayColumns(columns []string) *SearchRequestBuilder
func (*SearchRequestBuilder) WithReferences ¶
func (builder *SearchRequestBuilder) WithReferences(refs []*SearchReferences) *SearchRequestBuilder
func (*SearchRequestBuilder) WithSearchSource ¶
func (builder *SearchRequestBuilder) WithSearchSource(searchSource *SearchSource) *SearchRequestBuilder
func (*SearchRequestBuilder) WithSortColumns ¶
func (builder *SearchRequestBuilder) WithSortColumns(columns []string, order SortOrder) *SearchRequestBuilder
func (*SearchRequestBuilder) WithTitle ¶
func (builder *SearchRequestBuilder) WithTitle(title string) *SearchRequestBuilder
type SearchSource ¶
type SearchSource struct { IndexId string `json:"index"` IndexRefName string `json:"indexRefName"` HighlightAll bool `json:"highlightAll"` Version bool `json:"version"` Query interface{} `json:"query,omitempty"` Filter []*SearchFilter `json:"filter"` }
type SearchSourceBuilder ¶
type SearchSourceBuilder interface { WithIndexId(indexId string) SearchSourceBuilder WithIndexRefName(indexRefName string) SearchSourceBuilder WithQuery(query string) SearchSourceBuilder WithFilter(filter *SearchFilter) SearchSourceBuilder Build() (*SearchSource, error) }
type SearchSourceBuilderFactory ¶
type SearchSourceBuilderFactory interface {
NewSearchSource() SearchSourceBuilder
}
type Sort ¶
type Sort []string
Sort allows unmarshalling different json structure for the sort field. In newer version of Kibana this can be a nested JSON array (https://github.com/elastic/kibana/pull/41918/), while in the older versions it is a flat JSON array.
func (*Sort) UnmarshalJSON ¶
UnmarshalJSON tries to unmarshal the json data first into a nested array and if that fails it will try to unmarshal into a slice of string
type Space ¶
type Space struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Color string `json:"color,omitempty"` Initials string `json:"initials,omitempty"` ImageUrl string `json:"imageUrl,omitempty"` DisabledFeatures []string `json:"disabledFeatures,omitempty"` }
Space is the api definition of a space in kibana can be used to create, update and get a space
type SpaceClient ¶
type SpaceClient interface { Create(request *Space) error Update(request *Space) error GetByID(id string) (*Space, error) Delete(id string) error }
SpaceClient declares the required methods to implement to be a client and manage spaces
type UpdateDashboardRequest ¶
type UpdateDashboardRequest struct { Attributes *DashboardAttributes `json:"attributes"` References []*DashboardReferences `json:"references,omitempty"` }
type UpdateSearchRequest ¶
type UpdateSearchRequest struct { Attributes *SearchAttributes `json:"attributes"` References []*SearchReferences `json:"references,omitempty"` }
type UpdateVisualizationRequest ¶
type UpdateVisualizationRequest struct { Attributes *VisualizationAttributes `json:"attributes"` References []*VisualizationReferences `json:"references,omitempty"` }
type Visualization ¶
type Visualization struct { Id string `json:"id"` Type string `json:"type"` Version version `json:"version"` Attributes *VisualizationAttributes `json:"attributes"` References []*VisualizationReferences `json:"references,omitempty"` }
type VisualizationAttributes ¶
type VisualizationAttributes struct { Title string `json:"title"` Description string `json:"description"` Version int `json:"version"` VisualizationState string `json:"visState"` SavedSearchId string `json:"savedSearchId,omitempty"` SavedSearchRefName string `json:"savedSearchRefName,omitempty"` KibanaSavedObjectMeta *SearchKibanaSavedObjectMeta `json:"kibanaSavedObjectMeta"` }
type VisualizationClient ¶
type VisualizationClient interface { Create(request *CreateVisualizationRequest) (*Visualization, error) GetById(id string) (*Visualization, error) List() ([]*Visualization, error) Update(id string, request *UpdateVisualizationRequest) (*Visualization, error) Delete(id string) error }
type VisualizationReferences ¶
type VisualizationRequestBuilder ¶
type VisualizationRequestBuilder struct {
// contains filtered or unexported fields
}
func NewVisualizationRequestBuilder ¶
func NewVisualizationRequestBuilder() *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) Build ¶
func (builder *VisualizationRequestBuilder) Build(version string) (*CreateVisualizationRequest, error)
func (*VisualizationRequestBuilder) WithDescription ¶
func (builder *VisualizationRequestBuilder) WithDescription(description string) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithKibanaSavedObjectMeta ¶
func (builder *VisualizationRequestBuilder) WithKibanaSavedObjectMeta(meta *SearchKibanaSavedObjectMeta) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithReferences ¶
func (builder *VisualizationRequestBuilder) WithReferences(refs []*VisualizationReferences) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithSavedSearchId ¶
func (builder *VisualizationRequestBuilder) WithSavedSearchId(savedSearchId string) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithSavedSearchRefName ¶
func (builder *VisualizationRequestBuilder) WithSavedSearchRefName(savedSearchRefName string) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithTitle ¶
func (builder *VisualizationRequestBuilder) WithTitle(title string) *VisualizationRequestBuilder
func (*VisualizationRequestBuilder) WithVisualizationState ¶
func (builder *VisualizationRequestBuilder) WithVisualizationState(visualizationState string) *VisualizationRequestBuilder
Source Files ¶
- dashboard.go
- env.go
- error.go
- http_agent.go
- index_pattern.go
- kibana_client.go
- kibanatype_string.go
- logzio_authentication_handler.go
- role.go
- saved_objects.go
- saved_objects_553.go
- saved_objects_600.go
- search.go
- search_553.go
- search_600.go
- space.go
- testing.go
- testing_container_elasticsearch.go
- testing_container_kibana.go
- visualization.go