github.com/awslabs/clencli@v0.0.0-20210514234156-7ecf17182a20/cobra/model/configure.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  // Credentials model
    19  type Credentials struct {
    20  	Profiles []CredentialProfile `yaml:"profiles"`
    21  }
    22  
    23  // CredentialProfile model
    24  type CredentialProfile struct {
    25  	Name        string       `yaml:"name"`
    26  	Description string       `yaml:"description,omitempty"`
    27  	Credentials []Credential `yaml:"credentials"`
    28  }
    29  
    30  // Credential model
    31  type Credential struct {
    32  	Name         string `yaml:"name,omitempty"`
    33  	Provider     string `yaml:"provider"`
    34  	AccessKey    string `yaml:"accessKey"`
    35  	SecretKey    string `yaml:"secretKey"`
    36  	SessionToken string `yaml:"sessionToken"`
    37  }
    38  
    39  // Configurations model
    40  type Configurations struct {
    41  	Profiles []ConfigurationProfile `yaml:"profiles"`
    42  }
    43  
    44  // ConfigurationProfile model
    45  type ConfigurationProfile struct {
    46  	Name           string          `yaml:"name"`
    47  	Description    string          `yaml:"description,omitempty"`
    48  	Configurations []Configuration `yaml:"configurations"`
    49  }
    50  
    51  // Configuration model
    52  type Configuration struct {
    53  	Name           string `yaml:"name,omitempty"`
    54  	Initialization `yaml:"initialization,omitempty"`
    55  	Unsplash       `yaml:"unsplash,omitempty"`
    56  }