config

package
v0.0.0-...-4add913 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config holds config variables and functions

Index

Constants

This section is empty.

Variables

View Source
var CliConfig = CoreConfig{}

CliConfig is the global config variable

Functions

func IsConfigured

func IsConfigured(file string, profile string) error

IsConfigured checks if permctl cli has been configured

func Load

func Load(file string, profile string) error

Load the permctl configuration specified by the user into the global variable

func New

func New(file string, profile string) error

New initializes a new config file for permctl with the mentioned profile

func Write

func Write() error

Write the config file

Types

type CoreConfig

type CoreConfig struct {
	PermifyURL string `yaml:"permify_url"`
	Tenant     string `yaml:"tenant"`
	SslEnabled bool   `yaml:"-"`
}

CoreConfig is the config struct

type ProfileConfigs

type ProfileConfigs struct {
	Configs map[string]CoreConfig
	File    string
	Profile string
}

ProfileConfigs stores configs for all profiles

Jump to

Keyboard shortcuts

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