Documentation
¶
Index ¶
- Constants
- type AuthToken
- type DirectiveMap
- type File
- type FileStats
- type Project
- type ProjectConfig
- func (c *ProjectConfig) FilePath(filename string) string
- func (c *ProjectConfig) FileURI(filename string) string
- func (c *ProjectConfig) LocaleFor(localeID string) string
- func (c *ProjectConfig) Merge(delta *ProjectConfig) error
- func (c *ProjectConfig) SaveAllFiles(files []*File, resource *ProjectResource)
- func (c *ProjectConfig) SaveFile(file *File, resource *ProjectResource) error
- type ProjectResource
- type UserToken
Constants ¶
View Source
const DirectivePrefix = "smartling."
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectiveMap ¶
func (DirectiveMap) WithPrefix ¶
func (d DirectiveMap) WithPrefix() map[string]string
type ProjectConfig ¶
type ProjectConfig struct {
UserToken `yaml:",inline"`
Project `yaml:",inline"`
AuthToken `yaml:",inline"`
Resources []ProjectResource `yaml:"Files,omitempty"`
Locales map[string]string `yaml:"Locales,omitempty"`
}
func (*ProjectConfig) FilePath ¶
func (c *ProjectConfig) FilePath(filename string) string
func (*ProjectConfig) FileURI ¶
func (c *ProjectConfig) FileURI(filename string) string
func (*ProjectConfig) LocaleFor ¶
func (c *ProjectConfig) LocaleFor(localeID string) string
func (*ProjectConfig) Merge ¶
func (c *ProjectConfig) Merge(delta *ProjectConfig) error
func (*ProjectConfig) SaveAllFiles ¶
func (c *ProjectConfig) SaveAllFiles(files []*File, resource *ProjectResource)
func (*ProjectConfig) SaveFile ¶
func (c *ProjectConfig) SaveFile(file *File, resource *ProjectResource) error
type ProjectResource ¶
type ProjectResource struct {
Type string `yaml:"Type"`
PathGlob string `yaml:"PathGlob"`
PathExpression string `yaml:"PathExpression"`
PathExclude []string `yaml:"PathExclude,omitempty"`
AuthorizeContent bool `yaml:"AuthorizeContent"`
Directives DirectiveMap `yaml:"Directives,omitempty"`
}
func (*ProjectResource) Files ¶
func (r *ProjectResource) Files() []string
func (*ProjectResource) LimitFiles ¶
func (r *ProjectResource) LimitFiles(limit int) [][]string
Click to show internal directories.
Click to hide internal directories.