Documentation ¶
Index ¶
- type ElasticsearchHandler
- type ElasticsearchHandlerImpl
- func (h *ElasticsearchHandlerImpl) ComponentTemplateDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) ComponentTemplateDiff(actual, expected *olivere.IndicesGetComponentTemplateData) (diff string, err error)
- func (h *ElasticsearchHandlerImpl) ComponentTemplateGet(name string) (component *olivere.IndicesGetComponentTemplateData, err error)
- func (h *ElasticsearchHandlerImpl) ComponentTemplateUpdate(name string, component *olivere.IndicesGetComponentTemplateData) (err error)
- func (h *ElasticsearchHandlerImpl) ILMDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) ILMDiff(actual, expected *olivere.XPackIlmGetLifecycleResponse) (diffStr string, err error)
- func (h *ElasticsearchHandlerImpl) ILMGet(name string) (policy *olivere.XPackIlmGetLifecycleResponse, err error)
- func (h *ElasticsearchHandlerImpl) ILMUpdate(name string, policy *olivere.XPackIlmGetLifecycleResponse) (err error)
- func (h *ElasticsearchHandlerImpl) IndexTemplateDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) IndexTemplateDiff(actual, expected *olivere.IndicesGetIndexTemplate) (diff string, err error)
- func (h *ElasticsearchHandlerImpl) IndexTemplateGet(name string) (template *olivere.IndicesGetIndexTemplate, err error)
- func (h *ElasticsearchHandlerImpl) IndexTemplateUpdate(name string, template *olivere.IndicesGetIndexTemplate) (err error)
- func (h *ElasticsearchHandlerImpl) LicenseDelete() (err error)
- func (h *ElasticsearchHandlerImpl) LicenseDiff(actual, expected *olivere.XPackInfoLicense) (isDiff bool)
- func (h *ElasticsearchHandlerImpl) LicenseEnableBasic() (err error)
- func (h *ElasticsearchHandlerImpl) LicenseGet() (license *olivere.XPackInfoLicense, err error)
- func (h *ElasticsearchHandlerImpl) LicenseUpdate(license string) (err error)
- func (h *ElasticsearchHandlerImpl) RoleDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) RoleDiff(actual, expected *XPackSecurityRole) (diff string, err error)
- func (h *ElasticsearchHandlerImpl) RoleGet(name string) (role *XPackSecurityRole, err error)
- func (h *ElasticsearchHandlerImpl) RoleMappingDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) RoleMappingDiff(actual, expected *olivere.XPackSecurityRoleMapping) (diff string, err error)
- func (h *ElasticsearchHandlerImpl) RoleMappingGet(name string) (roleMapping *olivere.XPackSecurityRoleMapping, err error)
- func (h *ElasticsearchHandlerImpl) RoleMappingUpdate(name string, roleMapping *olivere.XPackSecurityRoleMapping) (err error)
- func (h *ElasticsearchHandlerImpl) RoleUpdate(name string, role *XPackSecurityRole) (err error)
- func (h *ElasticsearchHandlerImpl) SLMDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) SLMDiff(actual, expected *SnapshotLifecyclePolicySpec) (diffStr string, err error)
- func (h *ElasticsearchHandlerImpl) SLMGet(name string) (policy *SnapshotLifecyclePolicySpec, err error)
- func (h *ElasticsearchHandlerImpl) SLMUpdate(name string, policy *SnapshotLifecyclePolicySpec) (err error)
- func (h *ElasticsearchHandlerImpl) SetLogger(log *logrus.Entry)
- func (h *ElasticsearchHandlerImpl) SnapshotRepositoryDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) SnapshotRepositoryDiff(actual, expected *olivere.SnapshotRepositoryMetaData) (diffStr string, err error)
- func (h *ElasticsearchHandlerImpl) SnapshotRepositoryGet(name string) (repository *olivere.SnapshotRepositoryMetaData, err error)
- func (h *ElasticsearchHandlerImpl) SnapshotRepositoryUpdate(name string, repository *olivere.SnapshotRepositoryMetaData) (err error)
- func (h *ElasticsearchHandlerImpl) UserCreate(name string, user *olivere.XPackSecurityPutUserRequest) (err error)
- func (h *ElasticsearchHandlerImpl) UserDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) UserDiff(actual, expected *olivere.XPackSecurityPutUserRequest) (diff string, err error)
- func (h *ElasticsearchHandlerImpl) UserGet(name string) (user *olivere.XPackSecurityUser, err error)
- func (h *ElasticsearchHandlerImpl) UserUpdate(name string, user *olivere.XPackSecurityPutUserRequest) (err error)
- func (h *ElasticsearchHandlerImpl) WatchDelete(name string) (err error)
- func (h *ElasticsearchHandlerImpl) WatchDiff(actual, expected *olivere.XPackWatch) (diffStr string, err error)
- func (h *ElasticsearchHandlerImpl) WatchGet(name string) (watch *olivere.XPackWatch, err error)
- func (h *ElasticsearchHandlerImpl) WatchUpdate(name string, watch *olivere.XPackWatch) (err error)
- type ElasticsearchSLMConfig
- type ElasticsearchSLMRetention
- type SnapshotLifecyclePolicy
- type SnapshotLifecyclePolicyGet
- type SnapshotLifecyclePolicySpec
- type XPackSecurityApplicationPrivileges
- type XPackSecurityIndicesPermissions
- type XPackSecurityRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticsearchHandler ¶
type ElasticsearchHandler interface { // License scope LicenseUpdate(license string) (err error) LicenseDelete() (err error) LicenseGet() (license *olivere.XPackInfoLicense, err error) LicenseDiff(actual, expected *olivere.XPackInfoLicense) (diff bool) LicenseEnableBasic() (err error) // ILM scope ILMUpdate(name string, policy *olivere.XPackIlmGetLifecycleResponse) (err error) ILMDelete(name string) (err error) ILMGet(name string) (policy *olivere.XPackIlmGetLifecycleResponse, err error) ILMDiff(actual, expected *olivere.XPackIlmGetLifecycleResponse) (diff string, err error) // SLM scope SLMUpdate(name string, policy *SnapshotLifecyclePolicySpec) (err error) SLMDelete(name string) (err error) SLMGet(name string) (policy *SnapshotLifecyclePolicySpec, err error) SLMDiff(actual, expected *SnapshotLifecyclePolicySpec) (diff string, err error) // Snapshot repository scope SnapshotRepositoryUpdate(name string, repository *olivere.SnapshotRepositoryMetaData) (err error) SnapshotRepositoryDelete(name string) (err error) SnapshotRepositoryGet(name string) (repository *olivere.SnapshotRepositoryMetaData, err error) SnapshotRepositoryDiff(actual, expected *olivere.SnapshotRepositoryMetaData) (diff string, err error) // Role scope RoleUpdate(name string, role *XPackSecurityRole) (err error) RoleDelete(name string) (err error) RoleGet(name string) (role *XPackSecurityRole, err error) RoleDiff(actual, expected *XPackSecurityRole) (diff string, err error) // Role mapping scope RoleMappingUpdate(name string, roleMapping *olivere.XPackSecurityRoleMapping) (err error) RoleMappingDelete(name string) (err error) RoleMappingGet(name string) (roleMapping *olivere.XPackSecurityRoleMapping, err error) RoleMappingDiff(actual, expected *olivere.XPackSecurityRoleMapping) (diff string, err error) // User scope UserCreate(name string, user *olivere.XPackSecurityPutUserRequest) (err error) UserUpdate(name string, user *olivere.XPackSecurityPutUserRequest) (err error) UserDelete(name string) (err error) UserGet(name string) (user *olivere.XPackSecurityUser, err error) UserDiff(actual, expected *olivere.XPackSecurityPutUserRequest) (diff string, err error) // Component template scope ComponentTemplateUpdate(name string, component *olivere.IndicesGetComponentTemplateData) (err error) ComponentTemplateDelete(name string) (err error) ComponentTemplateGet(name string) (component *olivere.IndicesGetComponentTemplateData, err error) ComponentTemplateDiff(actual, expected *olivere.IndicesGetComponentTemplateData) (diff string, err error) // Index template scope IndexTemplateUpdate(name string, template *olivere.IndicesGetIndexTemplate) (err error) IndexTemplateDelete(name string) (err error) IndexTemplateGet(name string) (template *olivere.IndicesGetIndexTemplate, err error) IndexTemplateDiff(actual, expected *olivere.IndicesGetIndexTemplate) (diff string, err error) // ILM scope WatchUpdate(name string, watch *olivere.XPackWatch) (err error) WatchDelete(name string) (err error) WatchGet(name string) (watch *olivere.XPackWatch, err error) WatchDiff(actual, expected *olivere.XPackWatch) (diff string, err error) SetLogger(log *logrus.Entry) }
func NewElasticsearchHandler ¶
type ElasticsearchHandlerImpl ¶
type ElasticsearchHandlerImpl struct {
// contains filtered or unexported fields
}
func (*ElasticsearchHandlerImpl) ComponentTemplateDelete ¶
func (h *ElasticsearchHandlerImpl) ComponentTemplateDelete(name string) (err error)
ComponentTemplateDelete permit to delete component template
func (*ElasticsearchHandlerImpl) ComponentTemplateDiff ¶
func (h *ElasticsearchHandlerImpl) ComponentTemplateDiff(actual, expected *olivere.IndicesGetComponentTemplateData) (diff string, err error)
ComponentTemplateDiff permit to check if 2 component template are the same
func (*ElasticsearchHandlerImpl) ComponentTemplateGet ¶
func (h *ElasticsearchHandlerImpl) ComponentTemplateGet(name string) (component *olivere.IndicesGetComponentTemplateData, err error)
ComponentTemplateGet permit to get component template
func (*ElasticsearchHandlerImpl) ComponentTemplateUpdate ¶
func (h *ElasticsearchHandlerImpl) ComponentTemplateUpdate(name string, component *olivere.IndicesGetComponentTemplateData) (err error)
ComponentTemplateUpdate permit to update component template
func (*ElasticsearchHandlerImpl) ILMDelete ¶
func (h *ElasticsearchHandlerImpl) ILMDelete(name string) (err error)
ILMDelete permit to delete policy
func (*ElasticsearchHandlerImpl) ILMDiff ¶
func (h *ElasticsearchHandlerImpl) ILMDiff(actual, expected *olivere.XPackIlmGetLifecycleResponse) (diffStr string, err error)
ILMDiff permit to check if 2 policy are the same
func (*ElasticsearchHandlerImpl) ILMGet ¶
func (h *ElasticsearchHandlerImpl) ILMGet(name string) (policy *olivere.XPackIlmGetLifecycleResponse, err error)
ILMGet permit to get policy
func (*ElasticsearchHandlerImpl) ILMUpdate ¶
func (h *ElasticsearchHandlerImpl) ILMUpdate(name string, policy *olivere.XPackIlmGetLifecycleResponse) (err error)
ILMUpdate permit to update or create policy
func (*ElasticsearchHandlerImpl) IndexTemplateDelete ¶
func (h *ElasticsearchHandlerImpl) IndexTemplateDelete(name string) (err error)
IndexTemplateDelete permit to delete index template
func (*ElasticsearchHandlerImpl) IndexTemplateDiff ¶
func (h *ElasticsearchHandlerImpl) IndexTemplateDiff(actual, expected *olivere.IndicesGetIndexTemplate) (diff string, err error)
IndexTemplateDiff permit to check if 2 index template is the same
func (*ElasticsearchHandlerImpl) IndexTemplateGet ¶
func (h *ElasticsearchHandlerImpl) IndexTemplateGet(name string) (template *olivere.IndicesGetIndexTemplate, err error)
IndexTemplateGet permit to get index template
func (*ElasticsearchHandlerImpl) IndexTemplateUpdate ¶
func (h *ElasticsearchHandlerImpl) IndexTemplateUpdate(name string, template *olivere.IndicesGetIndexTemplate) (err error)
IndexTemplateUpdate permit to create or update index template
func (*ElasticsearchHandlerImpl) LicenseDelete ¶
func (h *ElasticsearchHandlerImpl) LicenseDelete() (err error)
LicenseDelete permit to delete the current license
func (*ElasticsearchHandlerImpl) LicenseDiff ¶
func (h *ElasticsearchHandlerImpl) LicenseDiff(actual, expected *olivere.XPackInfoLicense) (isDiff bool)
LicenseDiff permit to compare actual license with expected license. It only compare the UID if expected is not basic license
func (*ElasticsearchHandlerImpl) LicenseEnableBasic ¶
func (h *ElasticsearchHandlerImpl) LicenseEnableBasic() (err error)
LicenseEnableBasic permit to enable basic license
func (*ElasticsearchHandlerImpl) LicenseGet ¶
func (h *ElasticsearchHandlerImpl) LicenseGet() (license *olivere.XPackInfoLicense, err error)
LicenseGet permit to get the current license
func (*ElasticsearchHandlerImpl) LicenseUpdate ¶
func (h *ElasticsearchHandlerImpl) LicenseUpdate(license string) (err error)
LicenseUpdate permit to add or update new license
func (*ElasticsearchHandlerImpl) RoleDelete ¶
func (h *ElasticsearchHandlerImpl) RoleDelete(name string) (err error)
RoleDelete permit to delete role
func (*ElasticsearchHandlerImpl) RoleDiff ¶
func (h *ElasticsearchHandlerImpl) RoleDiff(actual, expected *XPackSecurityRole) (diff string, err error)
RoleDiff permit to check if 2 role are the same
func (*ElasticsearchHandlerImpl) RoleGet ¶
func (h *ElasticsearchHandlerImpl) RoleGet(name string) (role *XPackSecurityRole, err error)
RoleGet permit to get role
func (*ElasticsearchHandlerImpl) RoleMappingDelete ¶
func (h *ElasticsearchHandlerImpl) RoleMappingDelete(name string) (err error)
RoleMappingDelete permit to delete role mapping
func (*ElasticsearchHandlerImpl) RoleMappingDiff ¶
func (h *ElasticsearchHandlerImpl) RoleMappingDiff(actual, expected *olivere.XPackSecurityRoleMapping) (diff string, err error)
RoleMappingDiff permit to check if 2 role mapping are the same
func (*ElasticsearchHandlerImpl) RoleMappingGet ¶
func (h *ElasticsearchHandlerImpl) RoleMappingGet(name string) (roleMapping *olivere.XPackSecurityRoleMapping, err error)
RoleMappingGet permit to get role mapping
func (*ElasticsearchHandlerImpl) RoleMappingUpdate ¶
func (h *ElasticsearchHandlerImpl) RoleMappingUpdate(name string, roleMapping *olivere.XPackSecurityRoleMapping) (err error)
RoleMappingUpdate permit to create or update role mapping
func (*ElasticsearchHandlerImpl) RoleUpdate ¶
func (h *ElasticsearchHandlerImpl) RoleUpdate(name string, role *XPackSecurityRole) (err error)
RoleUpdate permit to update role
func (*ElasticsearchHandlerImpl) SLMDelete ¶
func (h *ElasticsearchHandlerImpl) SLMDelete(name string) (err error)
SLMDelete permit to delete SLM policy
func (*ElasticsearchHandlerImpl) SLMDiff ¶
func (h *ElasticsearchHandlerImpl) SLMDiff(actual, expected *SnapshotLifecyclePolicySpec) (diffStr string, err error)
SLMDiff permit to check if 2 policy are the same
func (*ElasticsearchHandlerImpl) SLMGet ¶
func (h *ElasticsearchHandlerImpl) SLMGet(name string) (policy *SnapshotLifecyclePolicySpec, err error)
SLMGet permit to get SLM policy
func (*ElasticsearchHandlerImpl) SLMUpdate ¶
func (h *ElasticsearchHandlerImpl) SLMUpdate(name string, policy *SnapshotLifecyclePolicySpec) (err error)
SLMUpdate permit to add or update SLM policy
func (*ElasticsearchHandlerImpl) SetLogger ¶
func (h *ElasticsearchHandlerImpl) SetLogger(log *logrus.Entry)
func (*ElasticsearchHandlerImpl) SnapshotRepositoryDelete ¶
func (h *ElasticsearchHandlerImpl) SnapshotRepositoryDelete(name string) (err error)
SnapshotRepositoryDelete permit to delete snapshot repository
func (*ElasticsearchHandlerImpl) SnapshotRepositoryDiff ¶
func (h *ElasticsearchHandlerImpl) SnapshotRepositoryDiff(actual, expected *olivere.SnapshotRepositoryMetaData) (diffStr string, err error)
SnapshotRepositoryDiff permit to check if 2 repositories are the same
func (*ElasticsearchHandlerImpl) SnapshotRepositoryGet ¶
func (h *ElasticsearchHandlerImpl) SnapshotRepositoryGet(name string) (repository *olivere.SnapshotRepositoryMetaData, err error)
SnapshotRepositoryGet permit to get snapshot repository
func (*ElasticsearchHandlerImpl) SnapshotRepositoryUpdate ¶
func (h *ElasticsearchHandlerImpl) SnapshotRepositoryUpdate(name string, repository *olivere.SnapshotRepositoryMetaData) (err error)
SnapshotRepositoryUpdate permit to create or update snapshot repository
func (*ElasticsearchHandlerImpl) UserCreate ¶
func (h *ElasticsearchHandlerImpl) UserCreate(name string, user *olivere.XPackSecurityPutUserRequest) (err error)
UserCreate permit to create new user
func (*ElasticsearchHandlerImpl) UserDelete ¶
func (h *ElasticsearchHandlerImpl) UserDelete(name string) (err error)
UserDelete permit to delete the user
func (*ElasticsearchHandlerImpl) UserDiff ¶
func (h *ElasticsearchHandlerImpl) UserDiff(actual, expected *olivere.XPackSecurityPutUserRequest) (diff string, err error)
UserDiff permit to check if 2 users are the same
func (*ElasticsearchHandlerImpl) UserGet ¶
func (h *ElasticsearchHandlerImpl) UserGet(name string) (user *olivere.XPackSecurityUser, err error)
UserGet permot to get the user
func (*ElasticsearchHandlerImpl) UserUpdate ¶
func (h *ElasticsearchHandlerImpl) UserUpdate(name string, user *olivere.XPackSecurityPutUserRequest) (err error)
UserUpdate permit to update the user
func (*ElasticsearchHandlerImpl) WatchDelete ¶
func (h *ElasticsearchHandlerImpl) WatchDelete(name string) (err error)
ILMDelete permit to delete policy
func (*ElasticsearchHandlerImpl) WatchDiff ¶
func (h *ElasticsearchHandlerImpl) WatchDiff(actual, expected *olivere.XPackWatch) (diffStr string, err error)
ILMDiff permit to check if 2 policy are the same
func (*ElasticsearchHandlerImpl) WatchGet ¶
func (h *ElasticsearchHandlerImpl) WatchGet(name string) (watch *olivere.XPackWatch, err error)
ILMGet permit to get policy
func (*ElasticsearchHandlerImpl) WatchUpdate ¶
func (h *ElasticsearchHandlerImpl) WatchUpdate(name string, watch *olivere.XPackWatch) (err error)
ILMUpdate permit to update or create policy
type ElasticsearchSLMConfig ¶
type ElasticsearchSLMConfig struct { ExpendWildcards string `json:"expand_wildcards,omitempty"` IncludeGlobalState bool `json:"include_global_state,omitempty"` Indices []string `json:"indices,omitempty"` FeatureStates []string `json:"feature_states,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` Partial bool `json:"partial,omitempty"` }
ElasticsearchSLMConfig is the config sub section
type ElasticsearchSLMRetention ¶
type ElasticsearchSLMRetention struct { ExpireAfter string `json:"expire_after,omitempty"` MaxCount int64 `json:"max_count,omitempty"` MinCount int64 `json:"min_count,omitempty"` }
ElasticsearchSLMRetention is the retention sub section
type SnapshotLifecyclePolicy ¶
type SnapshotLifecyclePolicy map[string]*SnapshotLifecyclePolicyGet
SnapshotLifecyclePolicy object returned by API
type SnapshotLifecyclePolicyGet ¶
type SnapshotLifecyclePolicyGet struct {
Policy *SnapshotLifecyclePolicySpec `json:"policy"`
}
SnapshotLifecyclePolicyGet is the policy
type SnapshotLifecyclePolicySpec ¶
type SnapshotLifecyclePolicySpec struct { Schedule string `json:"schedule"` Name string `json:"name"` Repository string `json:"repository"` Config ElasticsearchSLMConfig `json:"config"` Retention *ElasticsearchSLMRetention `json:"retention,omitempty"` }
SnapshotLifecyclePolicySpec is the snapshot lifecycle policy object
type XPackSecurityApplicationPrivileges ¶
type XPackSecurityApplicationPrivileges struct { Application string `json:"application"` Privileges []string `json:"privileges,omitempty"` Resources []string `json:"resources,omitempty"` }
XPackSecurityApplicationPrivileges is the application privileges object
type XPackSecurityIndicesPermissions ¶
type XPackSecurityIndicesPermissions struct { Names []string `json:"names"` Privileges []string `json:"privileges"` FieldSecurity interface{} `json:"field_security,omitempty"` Query string `json:"query,omitempty"` }
XPackSecurityIndicesPermissions is the indices permission object
type XPackSecurityRole ¶
type XPackSecurityRole struct { RunAs []string `json:"run_as,omitempty"` Cluster []string `json:"cluster,omitempty"` Indices []XPackSecurityIndicesPermissions `json:"indices,omitempty"` Applications []XPackSecurityApplicationPrivileges `json:"applications,omitempty"` Global map[string]interface{} `json:"global,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` TransientMetadata map[string]interface{} `json:"transient_metadata,omitempty"` }
Some fix not provided by olivere