config

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(c *api.Client, config Config, replace bool) error

Types

type Config

type Config struct {
	Providers []Provider `yaml:"providers" validate:"dive"`
	Grants    []Grant    `yaml:"grants" validate:"dive"`
}

type Grant

type Grant struct {
	User     string `yaml:"user" validate:"excluded_with=Group,excluded_with=Machine"`
	Group    string `yaml:"group" validate:"excluded_with=User,excluded_with=Machine"`
	Machine  string `yaml:"machine" validate:"excluded_with=User,excluded_with=Group"`
	Provider string `yaml:"provider"`
	Role     string `yaml:"role" validate:"required"`
	Resource string `yaml:"resource" validate:"required"`
}

type Provider

type Provider struct {
	Name         string `yaml:"name" validate:"required"`
	URL          string `yaml:"url" validate:"required"`
	ClientID     string `yaml:"clientID" validate:"required"`
	ClientSecret string `yaml:"clientSecret" validate:"required"`
}

Jump to

Keyboard shortcuts

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