module

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>

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 © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>

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 © 2021 Gastón Durand Vadas <gdurandvadas@gmail.com>

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ignored

func Ignored(list []string, item string) bool

Check if file is on the ignored list

Types

type Module

type Module struct {
	// Remote state attributes
	Path             string
	OrganizationName string
	Client           *tfe.Client
	Ctx              context.Context

	// .module.{yml|yaml} config attributes
	Name     string   `yaml:"name"`
	Provider string   `yaml:"provider"`
	Ignored  []string `yaml:"ignored"`
}

Module type to interact with modules Defines remote state attributes and config attributes

func (*Module) Delete

func (m *Module) Delete()

Deletes a module - version: removes a specific version of a module - provider: removes all versions of certain module/provider

func (*Module) NewVersion

func (m *Module) NewVersion(client *tfe.Client, ctx context.Context, organizationName, semver string) *tfe.RegistryModuleVersion

The NewVersion function will either: - create the module version v0.0.1 if the module doesn't exists - create a new version calculated with semver from the existing

func (*Module) Pack

func (m *Module) Pack(tempDir string)

Pack stores all the files on the module, minus the ignored. The files are placed in a temporal directory

func (*Module) Publish

func (m *Module) Publish(semver string)

Publish a new module calculating the version via semver

func (*Module) ReadConfig

func (m *Module) ReadConfig()

Read the .module.{yml|yaml} file in the module path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL