Skip to content

Commit

Permalink
chore: rename Files to File and some struct tags cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Mar 24, 2023
1 parent 4bc730d commit 9a1e6ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions api/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ var GlobalBackends []SearchBackend
// that consists of configuration for a list of backends.
type SearchConfig struct {
// Path is the path of this config file
Path string `yaml:"-"`
Backends SearchBackendConfigs `yaml:"backends,omitempty"`
Path string `yaml:"-" json:"-"`
Backends SearchBackendConfigs `yaml:"backends,omitempty" json:"backends,omitempty"`
}

// +kubebuilder:object:generate=true
type SearchBackendConfig struct {
ElasticSearch *ElasticSearchBackendConfig `json:"elasticsearch,omitempty"`
OpenSearch *OpenSearchBackendConfig `json:"opensearch,omitempty"`
Kubernetes *KubernetesSearchBackendConfig `json:"kubernetes,omitempty"`
Files *FileSearchBackendConfig `json:"file,omitempty" yaml:"file,omitempty"`
ElasticSearch *ElasticSearchBackendConfig `json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"`
OpenSearch *OpenSearchBackendConfig `json:"opensearch,omitempty" yaml:"opensearch,omitempty"`
Kubernetes *KubernetesSearchBackendConfig `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"`
File *FileSearchBackendConfig `json:"file,omitempty" yaml:"file,omitempty"`
}

type SearchBackend struct {
Name string `json:"name"`
API SearchAPI `json:"-"`
ElasticSearch *ElasticSearchBackendConfig `json:"elasticsearch,omitempty"`
OpenSearch *OpenSearchBackendConfig `json:"opensearch,omitempty"`
Kubernetes *KubernetesSearchBackendConfig `json:"kubernetes,omitempty"`
File *FileSearchBackendConfig `json:"file,omitempty" yaml:"file,omitempty"`
Name string
API SearchAPI
ElasticSearch *ElasticSearchBackendConfig
OpenSearch *OpenSearchBackendConfig
Kubernetes *KubernetesSearchBackendConfig
File *FileSearchBackendConfig
}

type Routes []SearchRoute
Expand All @@ -62,7 +62,7 @@ type CommonBackend struct {
func (b SearchBackendConfig) ToSearchBackend() SearchBackend {
return SearchBackend{
Kubernetes: b.Kubernetes,
File: b.Files,
File: b.File,
ElasticSearch: b.ElasticSearch,
OpenSearch: b.OpenSearch,
}
Expand Down
4 changes: 2 additions & 2 deletions api/logs/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a1e6ec

Please sign in to comment.