entities

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

*

  • Copyright 2021 Napptive *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • https://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

*

  • Copyright 2021 Napptive *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • https://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSummary

type AppSummary struct {
	// Namespace with the namespace of the application
	Namespace string
	// ApplicationName with the name of the application
	ApplicationName string
	// TagMetadataName with the MetadataName indexed by Tag
	TagMetadataName map[string]string
	MetadataLogo map[string][]ApplicationLogo
}

func (*AppSummary) ToApplicationSummary

func (a *AppSummary) ToApplicationSummary() *grpc_catalog_go.ApplicationSummary

ToApplicationSummary converts the ApplicationSummary to grpc_catalog_go.ApplicationSummary

type ApplicationID

type ApplicationID struct {
	// Namespace associated with the application.
	Namespace string
	// ApplicationName with the name of the application
	ApplicationName string
	// Tag with the tag/version of the application
	Tag string
}

ApplicationID with the application identifier (catalogURL-Namespace-AppName-tag) these four fields must be unique

func (*ApplicationID) String

func (a *ApplicationID) String() string

type ApplicationInfo

type ApplicationInfo struct {
	// CatalogID with an internal identifier
	CatalogID string
	// Namespace where the application is located.
	Namespace string
	// ApplicationName with the name of the application
	ApplicationName string
	// Tag with the tag/version of the application
	Tag string
	// Readme with the content of the README file
	Readme string
	// Metadata with the metadata.yaml file
	Metadata string
	//MedataName with the name defined in metadata file. This field is used to store it in elastic field and return it when listing
	MetadataName string
}

ApplicationInfo with the metadata of application, this will be the application info showed

func (*ApplicationInfo) ToApplicationID

func (a *ApplicationInfo) ToApplicationID() *ApplicationID

ToApplicationID converts ApplicationSummary to ApplicationID

type ApplicationLogo struct {
	// Src with the src URL
	Src string `yaml:"src"`
	// Type with the logo type (p.e: image/png)
	Type string `yaml:"type"`
	// Size with the logo size (p.e. 120x120)
	Size string `yaml:"size"`
}

ApplicationLogo represents the application logo

func (*ApplicationLogo) ToGRPC

ToGRPC converts ApplicationLogo to grpc_catalog_go.ApplicationLogo

type ApplicationMetadata

type ApplicationMetadata struct {
	APIVersion  string                 `yaml:"apiVersion"`
	Kind        string                 `yaml:"kind"`
	Name        string                 `yaml:"name"`
	Version     string                 `yaml:"version"`
	Description string                 `yaml:"description"`
	Keywords    []string               `yaml:"keywords"`
	License     string                 `yaml:"license"`
	Url         string                 `yaml:"url"`
	Doc         string                 `yaml:"doc"`
	Requires    ApplicationRequirement `yaml:"requires"`
}

ApplicationMetadata is a struct to load the kind and api_version of a file to check if it is metadata file

func (*ApplicationMetadata) ToGRPC

ToGRPC converts ApplicationMetadata to grpc_catalog_go.ApplicationMetadata

type ApplicationRequirement

type ApplicationRequirement struct {
	// Traits with the application traits
	Traits []string `yaml:"traits"`
	// Scopes with the application scopes
	Scopes []string `yaml:"scopes"`
	// K8s with all the K8s entities needed
	K8s []KubernetesEntities `yaml:"k8s"`
}

ApplicationRequirement with the application requirements

func (*ApplicationRequirement) ToGRPC

ToGRPC converts CatalogRequirement to grpc_catalog_go.CatalogRequirement

type ExtendedAppSummary

type ExtendedAppSummary struct {
	// Namespace with the namespace of the application
	Namespace string
	// ApplicationName with the name of the application
	ApplicationName string
	// TagMetadataName with the MetadataName indexed by Tag
	Tag          string
	MetadataName string
	Metadata     string
}

type ExtendedApplicationMetadata

type ExtendedApplicationMetadata struct {
	// CatalogID with an internal identifier
	CatalogID string
	// Namespace associated with the application.
	Namespace string
	// ApplicationName with the name of the application
	ApplicationName string
	// Tag with the tag/version of the application
	Tag string
	// Readme with the content of the README file
	Readme string
	// Metadata with the metadata.yaml file
	Metadata string
	// MetadataObj with the metadata object
	MetadataObj ApplicationMetadata
}

-- ExtendedApplicationMetadata ExtendedApplicationMetadata is an object with ApplicationMetadata and a field with metadata parsed

type FileInfo

type FileInfo struct {
	// path with the File path
	Path string
	// data with the content of the file
	Data []byte
}

FileInfo represents a file

func NewFileInfo

func NewFileInfo(info *grpc_catalog_go.FileInfo) *FileInfo

NewFileInfo creates FileInfo from *grpc_catalog_go.FileInfo

func (*FileInfo) ToGRPC

func (fi *FileInfo) ToGRPC() *grpc_catalog_go.FileInfo

ToGRPC converts FileInfo to grpc_catalog_go.FileInfo

type KubernetesEntities

type KubernetesEntities struct {
	// ApiVersion with the entity version
	ApiVersion string `yaml:"apiVersion"`
	// Kind with the entity type
	Kind string `yaml:"kind"`
	// Name with the entity name
	Name string `yaml:"name"`
}

KubernetesEntities with the application K8s entities

func (*KubernetesEntities) ToGRPC

ToGRPC converts KubernetesEntities to *grpc_catalog_go.KubernetesEntities

type Summary

type Summary struct {
	NumNamespaces   int
	NumApplications int
	NumTags         int
}

Summary with catalog summary

func (*Summary) ToSummaryResponse

func (s *Summary) ToSummaryResponse() *grpc_catalog_go.SummaryResponse

ToSummaryResponse converts Summary to GRPC

type User

type User struct {
	Username       string
	Salt           string
	SaltedPassword string
}

Jump to

Keyboard shortcuts

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