github.com/awslabs/clencli@v0.0.0-20210514234156-7ecf17182a20/cobra/model/root.go (about)

     1  /*
     2  Copyright © 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
     3  Licensed under the Apache License, Version 2.0 (the "License");
     4  you may not use this file except in compliance with the License.
     5  You may obtain a copy of the License at
     6  
     7      http://www.apache.org/licenses/LICENSE-2.0
     8  
     9  Unless required by applicable law or agreed to in writing, software
    10  distributed under the License is distributed on an "AS IS" BASIS,
    11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  See the License for the specific language governing permissions and
    13  limitations under the License.
    14  */
    15  
    16  package model
    17  
    18  import "os"
    19  
    20  // App represents the all the necessary information about clencli
    21  type App struct {
    22  	// Name of file to look for inside the path
    23  	Name                      string
    24  	ConfigurationsDir         string
    25  	ConfigurationsName        string
    26  	ConfigurationsType        string
    27  	ConfigurationsPath        string
    28  	ConfigurationsPermissions os.FileMode
    29  	CredentialsName           string
    30  	CredentialsType           string
    31  	CredentialsPath           string
    32  	CredentialsPermissions    os.FileMode
    33  	LogsDir                   string
    34  	LogsName                  string
    35  	LogsType                  string
    36  	LogsPath                  string
    37  	LogsPermissions           os.FileMode
    38  
    39  	WorkingDir string
    40  }
    41  
    42  // ReadMe struct of the readme.yaml
    43  type ReadMe struct {
    44  	Logo struct {
    45  		URL   string `yaml:"url"`
    46  		Label string `yaml:"label"`
    47  	} `yaml:"logo,omitempty"`
    48  	Shields struct {
    49  		Badges []struct {
    50  			Description string `yaml:"description"`
    51  			Image       string `yaml:"image"`
    52  			URL         string `yaml:"url"`
    53  		} `yaml:"badges"`
    54  	} `yaml:"shields,omitempty"`
    55  	App struct {
    56  		Name     string `yaml:"name"`
    57  		Function string `yaml:"function"`
    58  		ID       string `yaml:"id"`
    59  	} `yaml:"app,omitempty"`
    60  	Screenshots []struct {
    61  		Caption string `yaml:"caption"`
    62  		Label   string `yaml:"label"`
    63  		URL     string `yaml:"url"`
    64  	} `yaml:"screenshots,omitempty"`
    65  	Usage         string `yaml:"usage"`
    66  	Prerequisites []struct {
    67  		Description string `yaml:"description"`
    68  		Name        string `yaml:"name"`
    69  		URL         string `yaml:"url"`
    70  	} `yaml:"prerequisites,omitempty"`
    71  	Installing   string   `yaml:"installing,omitempty"`
    72  	Testing      string   `yaml:"testing,omitempty"`
    73  	Deployment   string   `yaml:"deployment,omitempty"`
    74  	Include      []string `yaml:"include,omitempty"`
    75  	Contributors []struct {
    76  		Name  string `yaml:"name"`
    77  		Role  string `yaml:"role"`
    78  		Email string `yaml:"email"`
    79  	} `yaml:"contributors,omitempty"`
    80  	Acknowledgments []struct {
    81  		Name string `yaml:"name"`
    82  		Role string `yaml:"role"`
    83  	} `yaml:"acknowledgments,omitempty"`
    84  	References []struct {
    85  		Description string `yaml:"description"`
    86  		Name        string `yaml:"name"`
    87  		URL         string `yaml:"url"`
    88  	} `yaml:"references,omitempty"`
    89  	License   string `yaml:"license,omitempty"`
    90  	Copyright string `yaml:"copyright,omitempty"`
    91  }