Documentation
¶
Overview ¶
Copyright 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 2016, Fitbit, Inc.
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
http://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 ¶
- 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) Locale(localeID string) string
- func (c *ProjectConfig) Merge(delta *ProjectConfig) error
- func (c *ProjectConfig) SaveAllFiles(files []*File, resource *ProjectResource) map[*File]error
- func (c *ProjectConfig) SaveFile(file *File, resource *ProjectResource) error
- type ProjectResource
- type UserToken
Constants ¶
This section is empty.
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) Locale ¶
func (c *ProjectConfig) Locale(localeID string) string
func (*ProjectConfig) Merge ¶
func (c *ProjectConfig) Merge(delta *ProjectConfig) error
func (*ProjectConfig) SaveAllFiles ¶
func (c *ProjectConfig) SaveAllFiles(files []*File, resource *ProjectResource) map[*File]error
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) BatchFiles ¶
func (r *ProjectResource) BatchFiles(size int) [][]string
func (*ProjectResource) FilePath ¶
func (r *ProjectResource) FilePath(filename string, locale string) (string, error)
func (*ProjectResource) Files ¶
func (r *ProjectResource) Files() []string