types

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByGlob

func FilterByGlob(pattern string) ([]string, error)

func FilterByModule

func FilterByModule(dir, moduleFilter string) ([]string, error)

func FormatXml

func FormatXml(toFormat string) (string, error)

func GetFieldNameForDirName

func GetFieldNameForDirName(dirName string) string

GetFieldNameForDirName returns the metadata field name for a given directory name

func GetMetadataTypeDirNames

func GetMetadataTypeDirNames() []string

GetMetadataTypeDirNames returns the directory names for a type

func StringSliceContainsKey

func StringSliceContainsKey(strings []string, key string) bool

StringSliceContainsKey returns true if a string is contained in a slice

Types

type MasterPage

type MasterPage struct {
	Attributes map[string]string `json:"attributes"`
	Name       string            `json:"Name"`
	UniqueID   string            `json:"skuid__UniqueId__c"`
}

type Metadata

type Metadata struct {
	Apps           []string `json:"apps"`
	AuthProviders  []string `json:"authproviders"`
	ComponentPacks []string `json:"componentpacks"`
	DataServices   []string `json:"dataservices"`
	DataSources    []string `json:"datasources"`
	DesignSystems  []string `json:"designsystems"`
	Files          []string `json:"files"`
	Pages          []string `json:"pages"`
	Profiles       []string `json:"profiles"`
	Site           []string `json:"site"`
	Themes         []string `json:"themes"`
}

func (Metadata) FilterMetadataItem

func (m Metadata) FilterMetadataItem(relativeFilePath string) bool

FilterMetadataItem returns true if the path meets the filter criteria, otherwise it returns false

func (Metadata) GetNamesForType

func (m Metadata) GetNamesForType(metadataType string) []string

GetNamesForType returns the item names provided in the metadata for a particular type

type Page

type Page struct {
	ID                 string            `json:"Id"`
	Attributes         map[string]string `json:"attributes"`
	Name               string            `json:"Name"`
	Type               string            `json:"skuid__Type__c"`
	UniqueID           string            `json:"skuid__UniqueId__c"`
	Module             string            `json:"skuid__Module__c"`
	ComposerSettings   *string           `json:"skuid__Composer_Settings__c"`
	MasterPageID       *string           `json:"skuid__MasterPage__c"`
	MasterPageRelation *MasterPage       `json:"skuid__MasterPage__r"`
	IsMaster           bool              `json:"skuid__IsMaster__c"`
	Layout             *string           `json:"skuid__Layout__c"`
	Layout2            *string           `json:"skuid__Layout2__c"`
	Layout3            *string           `json:"skuid__Layout3__c"`
	Layout4            *string           `json:"skuid__Layout4__c"`
	Layout5            *string           `json:"skuid__Layout5__c"`
}

type PagePackResponse

type PagePackResponse map[string][]Page

func (PagePackResponse) WritePagePack

func (pack PagePackResponse) WritePagePack(filename, module string) error

type PagePost

type PagePost struct {
	Changes   []PullResponse `json:"changes"`
	Deletions []PullResponse `json:"deletions"`
}

type PagePostResult

type PagePostResult struct {
	OrgName string   `json:"orgName"`
	Success bool     `json:"success"`
	Errors  []string `json:"upsertErrors,omitempty"`
}

type Plan

type Plan struct {
	Host     string   `json:"host"`
	Port     string   `json:"port"`
	URL      string   `json:"url"`
	Type     string   `json:"type"`
	Metadata Metadata `json:"metadata"`
	Warnings []string `json:"warnings"`
}

type PullResponse

type PullResponse struct {
	APIVersion         string  `json:"apiVersion"`
	Name               string  `json:"name"`
	UniqueID           string  `json:"uniqueId"`
	Type               string  `json:"type"`
	Module             string  `json:"module"`
	MaxAutoSaves       int     `json:"maxAutoSaves"`
	MasterPageUniqueID string  `json:"masterPageUniqueId,omitempty"`
	IsMasterPage       bool    `json:"isMasterPage"`
	ComposerSettings   *string `json:"composerSettings"`
	Body               string  `json:"body,omitempty"`
}

func ReadFiles

func ReadFiles(dir, moduleFilter, file string) ([]PullResponse, error)

func (*PullResponse) FileBasename

func (page *PullResponse) FileBasename() string

func (*PullResponse) WriteAtRest

func (page *PullResponse) WriteAtRest(path string) (err error)

Jump to

Keyboard shortcuts

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