resource

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceCmd = &cobra.Command{
	Use:   "resource [load]",
	Short: "Manage your resources",
	Long:  `Manage your resources`,
	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}

ResourceCmd represents the resource command

Functions

func ScriptResource

func ScriptResource(resources []Resource)

Types

type CampaignData

type CampaignData struct {
	Id              string               `json:"id,omitempty"`
	ProjectId       string               `json:"project_id"`
	Name            string               `json:"name"`
	Description     string               `json:"description"`
	Type            string               `json:"type"`
	VariationGroups []VariationGroupData `json:"variation_groups"`
}

func (*CampaignData) Save

func (f *CampaignData) Save(data string) ([]byte, error)

type Data

type Data interface {
	Save(data string) ([]byte, error)
}

type FlagData

type FlagData struct {
	*models.Flag
}

func (*FlagData) Save

func (f *FlagData) Save(data string) ([]byte, error)

type GoalData

type GoalData struct {
	*models.Goal
}

func (*GoalData) Save

func (f *GoalData) Save(data string) ([]byte, error)

type ProjectData

type ProjectData struct {
	*models.Project
}

func (*ProjectData) Save

func (f *ProjectData) Save(data string) ([]byte, error)

type Resource

type Resource struct {
	Name             ResourceType
	Data             Data
	ResourceVariable string
}

func UnmarshalConfig

func UnmarshalConfig(filePath string) ([]Resource, error)

type ResourceData

type ResourceData struct {
	Id string `json:"id"`
}

type ResourceType

type ResourceType int
const (
	Project ResourceType = iota
	Flag
	TargetingKey
	Goal
	Campaign
	VariationGroup
	Variation
)

type TargetingKeysData

type TargetingKeysData struct {
	*models.TargetingKey
}

func (*TargetingKeysData) Save

func (f *TargetingKeysData) Save(data string) ([]byte, error)

type VariationData

type VariationData struct {
	*models.Variation
}

type VariationGroupData

type VariationGroupData struct {
	*models.VariationGroup
}

Jump to

Keyboard shortcuts

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