Documentation ¶
Overview ¶
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you 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.
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you 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.
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you 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.
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you 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
- Variables
- func Resolve(config *ConfigDeps, report *Report) error
- type ConfigDeps
- type GoModeResolver
- func (resolver *GoModeResolver) CanResolve(file string) bool
- func (resolver *GoModeResolver) Resolve(goModFile string, report *Report) error
- func (resolver *GoModeResolver) ResolvePackageLicense(p *packages.Package, report *Report) error
- func (resolver *GoModeResolver) ResolvePackages(pkgNames []string, report *Report) error
- type Report
- type Resolver
- type Result
- type SpdxID
Constants ¶
const (
Unknown string = "Unknown"
)
Variables ¶
var Resolvers = []Resolver{ new(GoModeResolver), }
Functions ¶
func Resolve ¶
func Resolve(config *ConfigDeps, report *Report) error
Types ¶
type ConfigDeps ¶
type ConfigDeps struct {
Files []string `yaml:"files"`
}
func (*ConfigDeps) Finalize ¶
func (config *ConfigDeps) Finalize(configFile string) error
type GoModeResolver ¶
type GoModeResolver struct {
Resolver
}
func (*GoModeResolver) CanResolve ¶
func (resolver *GoModeResolver) CanResolve(file string) bool
func (*GoModeResolver) Resolve ¶
func (resolver *GoModeResolver) Resolve(goModFile string, report *Report) error
Resolve resolves licenses of all dependencies declared in the go.mod file.
func (*GoModeResolver) ResolvePackageLicense ¶
func (resolver *GoModeResolver) ResolvePackageLicense(p *packages.Package, report *Report) error
func (*GoModeResolver) ResolvePackages ¶
func (resolver *GoModeResolver) ResolvePackages(pkgNames []string, report *Report) error
ResolvePackages resolves the licenses of the given packages.
type Report ¶
Report is a collection of resolved Result.