exofixtures

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Provider = "exoscale"

	// SosType represents object storage storage type
	SosType        ObjectType = "appcat_object-storage-storage"
	QuerySos                  = string(SosType) + ":" + Provider
	DefaultUnitSos            = "GBDay"
)

Variables

View Source
var BillingTypes = map[string]string{
	"pg":         queryDBaaSPostgres,
	"mysql":      queryDBaaSMysql,
	"opensearch": queryDBaaSOpensearch,
	"redis":      queryDBaaSRedis,
	"kafka":      queryDBaaSKafka,
}

BillingTypes contains exoscale service types to Query billing Database types

View Source
var DBaaS = map[ObjectType]InitConfig{

	PostgresDBaaSType: {
		Products: generatePostgresProducts(),
		Discount: db.Discount{
			Source:   string(PostgresDBaaSType),
			Discount: 0,
			During:   db.InfiniteRange(),
		},
		Query: db.Query{
			Name:        queryDBaaSPostgres,
			Description: "Database Service - PostgreSQL (exoscale.com)",
			Query:       "",
			Unit:        defaultUnitDBaaS,
			During:      db.InfiniteRange(),
		},
	},

	MysqlDBaaSType: {
		Products: generateMysqlProducts(),
		Discount: db.Discount{
			Source:   string(MysqlDBaaSType),
			Discount: 0,
			During:   db.InfiniteRange(),
		},
		Query: db.Query{
			Name:        queryDBaaSMysql,
			Description: "Database Service - MySQL (exoscale.com)",
			Query:       "",
			Unit:        defaultUnitDBaaS,
			During:      db.InfiniteRange(),
		},
	},

	OpensearchDBaaSType: {
		Products: generateOpensearchProducts(),
		Discount: db.Discount{
			Source:   string(OpensearchDBaaSType),
			Discount: 0,
			During:   db.InfiniteRange(),
		},
		Query: db.Query{
			Name:        queryDBaaSOpensearch,
			Description: "Database Service - Opensearch (exoscale.com)",
			Query:       "",
			Unit:        defaultUnitDBaaS,
			During:      db.InfiniteRange(),
		},
	},

	RedisDBaaSType: {
		Products: generateRedisProducts(),
		Discount: db.Discount{
			Source:   string(RedisDBaaSType),
			Discount: 0,
			During:   db.InfiniteRange(),
		},
		Query: db.Query{
			Name:        queryDBaaSRedis,
			Description: "Database Service - Redis (exoscale.com)",
			Query:       "",
			Unit:        defaultUnitDBaaS,
			During:      db.InfiniteRange(),
		},
	},

	KafkaDBaaSType: {
		Products: generateKafkaProducts(),
		Discount: db.Discount{
			Source:   string(KafkaDBaaSType),
			Discount: 0,
			During:   db.InfiniteRange(),
		},
		Query: db.Query{
			Name:        queryDBaaSKafka,
			Description: "Database Service - Kafka (exoscale.com)",
			Query:       "",
			Unit:        defaultUnitDBaaS,
			During:      db.InfiniteRange(),
		},
	},
}
View Source
var ObjectStorage = InitConfig{
	Products: []*db.Product{
		{
			Source: QuerySos,
			Target: sql.NullString{String: "1402", Valid: true},
			Amount: 0.000726,
			Unit:   "GBDay",
			During: db.InfiniteRange(),
		},
	},
	Discount: db.Discount{
		Source:   string(SosType),
		Discount: 0,
		During:   db.InfiniteRange(),
	},
	Query: db.Query{
		Name:        QuerySos,
		Description: "Object Storage - Storage (exoscale.com)",
		Query:       "",
		Unit:        "GBDay",
		During:      db.InfiniteRange(),
	},
}

Functions

This section is empty.

Types

type DBaaSSourceString

type DBaaSSourceString struct {
	Query        string
	Organization string
	Namespace    string
	Plan         string
}

func (DBaaSSourceString) GetQuery

func (ss DBaaSSourceString) GetQuery() string

func (DBaaSSourceString) GetSourceString

func (ss DBaaSSourceString) GetSourceString() string

type InitConfig

type InitConfig struct {
	Products []*db.Product
	Discount db.Discount
	Query    db.Query
}

InitConfig is used to define and then save the initial configuration

type ObjectType

type ObjectType string

ObjectType defines model for DBaaS types

const KafkaDBaaSType ObjectType = "appcat_kafka"

KafkaDBaaSType represents kafka DBaaS type

const MysqlDBaaSType ObjectType = "appcat_mysql"

MysqlDBaaSType represents mysql DBaaS type

const OpensearchDBaaSType ObjectType = "appcat_opensearch"

OpensearchDBaaSType represents opensearch DBaaS type

const PostgresDBaaSType ObjectType = "appcat_postgres"

PostgresDBaaSType represents postgres DBaaS type

const RedisDBaaSType ObjectType = "appcat_redis"

RedisDBaaSType represents redis DBaaS type

Jump to

Keyboard shortcuts

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