github.com/GoogleCloudPlatform/terraformer@v0.8.18/terraformutils/base_provider.go (about)

     1  // Copyright 2018 The Terraformer Authors.
     2  //
     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  package terraformutils
    16  
    17  import (
    18  	"github.com/zclconf/go-cty/cty"
    19  )
    20  
    21  type ProviderGenerator interface {
    22  	Init(args []string) error
    23  	InitService(serviceName string, verbose bool) error
    24  	GetName() string
    25  	GetService() ServiceGenerator
    26  	GetConfig() cty.Value
    27  	GetBasicConfig() cty.Value
    28  	GetSupportedService() map[string]ServiceGenerator
    29  	GenerateFiles()
    30  	GetProviderData(arg ...string) map[string]interface{}
    31  	GenerateOutputPath() error
    32  	GetResourceConnections() map[string]map[string][]string
    33  }
    34  
    35  type Provider struct {
    36  	Service ServiceGenerator
    37  	Config  cty.Value
    38  }
    39  
    40  func (p *Provider) Init(args []string) error {
    41  	panic("implement me")
    42  }
    43  
    44  func (p *Provider) GetConfig() cty.Value {
    45  	return p.Config
    46  }
    47  
    48  func (p *Provider) GetName() string {
    49  	panic("implement me")
    50  }
    51  
    52  func (p *Provider) InitService(serviceName string) error {
    53  	panic("implement me")
    54  }
    55  
    56  func (p *Provider) GenerateOutputPath() error {
    57  	panic("implement me")
    58  }
    59  
    60  func (p *Provider) GenerateFiles() {
    61  	panic("implement me")
    62  }
    63  
    64  func (p *Provider) GetService() ServiceGenerator {
    65  	return p.Service
    66  }
    67  
    68  func (p *Provider) GetSupportedService() map[string]ServiceGenerator {
    69  	panic("implement me")
    70  }
    71  
    72  func (p *Provider) GetBasicConfig() cty.Value {
    73  	return cty.ObjectVal(map[string]cty.Value{})
    74  }