Documentation ¶
Overview ¶
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
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.
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
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.
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
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 GetConfig(s config.Scope) (*config.Config, error)
- func GetFinalConfig(repo *git.Repository) (*config.Config, error)
- func NewConfigFromMap(src map[string]string) *config.Config
- func ReadConfig(r io.Reader) (*config.Config, error)
- type Author
- type Context
- type FetchURL
- type GetDirFunc
- type PushURL
- type Remote
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
GetConfig returns an instance of config.Config for the required scope (system or global Git configuration).
func GetFinalConfig ¶
GetFinalConfig retrives system, global, and local Git configurations and then merges them into a final config.Config instance.
This function also applies Git URL rules (if any) to the Git remotes.
func NewConfigFromMap ¶
NewConfigFromMap provides a config.Config instance populating it from the input map.
Types ¶
type Context ¶
type Context struct { User `json:"user,omitempty"` Author `json:"author,omitempty"` Remotes map[string]*Remote `json:"remotes,omitempty"` }
func NewContextFromFunc ¶
func NewContextFromFunc(f GetDirFunc) (*Context, error)