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 ¶
- func AddProfile(profile models.ProfileConfig) error
- func CheckGitRepo() bool
- func ClearConfig() error
- func DeleteProfile(profileName string) error
- func EditProfile(profileName string, updatedProfile models.ProfileConfig) error
- func GetAllProfiles() []models.ProfileConfig
- func GetConfigPath() string
- func GetProfileByName(profileName string) models.ProfileConfig
- func GetProfilesByOrigin(origin string) []models.ProfileConfig
- func GetRepoOrigin() (string, error)
- func GetUserEmail() (string, error)
- func GetUserName() (string, error)
- func LoadConfig() error
- func SaveConfig() error
- func SetConfigPath(path string)
- func SetUserEmail(email string) error
- func SetUserName(name string) error
- func UnsetUserEmail() error
- func UnsetUserName() error
- type Config
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 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 GetUserEmail ¶
func GetUserName ¶
func LoadConfig ¶
func LoadConfig() error
func SaveConfig ¶
func SaveConfig() error
func SetConfigPath ¶
func SetConfigPath(path string)
func SetUserEmail ¶
func SetUserName ¶
func UnsetUserEmail ¶
func UnsetUserEmail() error
func UnsetUserName ¶
func UnsetUserName() error
Types ¶
type Config ¶
type Config struct {
Profiles []models.ProfileConfig `toml:"profiles"`
}
var (
Conf Config
)