Documentation
¶
Overview ¶
Copyright © 2025 Timothy Tavarez <timothy.tavarez@decombine.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 ¶
var ( NetworkKey = "network" ConfigPath = "/.config/contract/" )
var DecombineClient = NetworkClient{ Address: "http://api.decombine.local:8025", Timeout: 10 * time.Second, }
var DecombineNetwork = slc.Network{
Name: "decombine",
API: "https://api.decombine.com",
URL: "https://decombine.com",
ClientID: "304073732412997862",
Issuer: "https://authentication.decombine.com",
DiscoveryEndpoint: "https://authentication.decombine.com/.well-known/openid-configuration",
}
var (
ErrSourceNotSupported = errors.New("source type not supported")
)
var ErrStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("9"))
var Lang string
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetIDToken ¶
func UpdateConfig ¶
func UpdateConfig(path string, config *ContractCLIConfig) error
Types ¶
type ContractCLIConfig ¶
type ContractCLIConfig struct { Language string `yaml:"language" toml:"language" json:"language"` DefaultContractFileType string `yaml:"defaultContractFileType" toml:"defaultContractFileType" json:"defaultContractFileType"` DefaultNetwork string `yaml:"defaultNetwork" toml:"defaultNetwork" json:"defaultNetwork"` Networks []slc.Network `yaml:"networks" toml:"networks" json:"networks"` }
func Config ¶
func Config() (ContractCLIConfig, error)