internal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package internal Copyright © 2024 Shieldine 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. /*

Package internal Copyright © 2024 Shieldine 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 AddProfile

func AddProfile(profile models.ProfileConfig) error

func CheckGitRepo

func CheckGitRepo() bool

func ClearConfig

func ClearConfig() error

func DeleteProfile

func DeleteProfile(profileName string) error

func EditProfile

func EditProfile(profileName string, updatedProfile models.ProfileConfig) error

func GetAllProfiles

func GetAllProfiles() []models.ProfileConfig

func GetConfigPath

func GetConfigPath() string

func GetProfileByName

func GetProfileByName(profileName string) models.ProfileConfig

func GetProfilesByOrigin

func GetProfilesByOrigin(origin string) []models.ProfileConfig

func GetRepoOrigin

func GetRepoOrigin() (string, error)

func GetUserEmail

func GetUserEmail() (string, error)

func GetUserName

func GetUserName() (string, error)

func LoadConfig

func LoadConfig() error

func SaveConfig

func SaveConfig() error

func SetConfigPath

func SetConfigPath(path string)

func SetUserEmail

func SetUserEmail(email string) error

func SetUserName

func SetUserName(name string) error

func UnsetUserEmail

func UnsetUserEmail() error

func UnsetUserName

func UnsetUserName() error

Types

type Config

type Config struct {
	Profiles []models.ProfileConfig `toml:"profiles"`
}
var (
	Conf Config
)

Jump to

Keyboard shortcuts

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