model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MulanPSL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFingerprint

type FileFingerprint struct {
	File        string           `json:"file"`
	Size        int64            `json:"size"`
	Count       int64            `json:"count"`
	Lines       int64            `json:"lines"`
	License     []string         `json:"license"`
	Copyright   []string         `json:"copyright"`
	Language    string           `json:"language"`
	MD5         string           `json:"md5"`
	SHA1        string           `json:"sha1"`
	SHA256      string           `json:"sha256"`
	Fingerprint FingerprintValue `json:"fingerprint"`
}

FileFingerprint is metadata of file.

type FileOutputMode

type FileOutputMode string

FileOutputMode is the output mode of fingerprint files.

const (
	OutputSingleFile FileOutputMode = "singlefile"
	OutputMultiFile  FileOutputMode = "multiplefile"
)

type Fingerprint

type Fingerprint struct {
	Metadata Metadata          `json:"metadata"`
	Files    []FileFingerprint `json:"files"`
}

Fingerprint of project.

type FingerprintValue

type FingerprintValue struct {
	File     string               `json:"file"`
	Snippets []SnippetFingerprint `json:"snippets"`
}

FingerprintValue is fingerprint of file and snippets.

type Metadata

type Metadata struct {
	TotalCount int64          `json:"totalCount"`
	TotalSize  int64          `json:"totalSize"`
	TotalFiles int64          `json:"totalFiles"`
	TotalLines int64          `json:"totalLines"`
	Language   []string       `json:"language"`
	CreatedAt  int64          `json:"createdAt"`
	OutputMode FileOutputMode `json:"outputMode"`
	Vendor     Vendor         `json:"vendor"`
	Repo       Repo           `json:"repo,omitempty"`
}

Metadata of fingerprint.

type Repo

type Repo struct {
	URL      string `json:"url"`
	Branch   string `json:"branch"`
	Revision string `json:"revision"`
}

Repo of source code.

type SnippetFingerprint

type SnippetFingerprint struct {
	Range string `json:"range"`
	Value string `json:"value"`
}

SnippetFingerprint is fingerprint of snippet.

type Vendor

type Vendor struct {
	Name        string `json:"name"`
	ToolName    string `json:"toolName"`
	ToolVersion string `json:"toolVersion"`
	AlgoName    string `json:"algoName"`
	AlgoVersion string `json:"algoVersion"`
}

Vendor of fingerprint.

Jump to

Keyboard shortcuts

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