models

package
v1.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectInfoDefaultArchFileName  = ".go-arch-lint.yml"
	ProjectInfoDefaultGoModFileName = "go.mod"
)
View Source
const SupportedVersion = 2

Variables

View Source
var OutputTypeVariantsConst = []string{
	OutputTypeASCII,
	OutputTypeJSON,
}

Functions

This section is empty.

Types

type Check

type Check struct {
	DocumentNotices        []CheckNotice                `json:"ExecutionWarnings"`
	ArchHasWarnings        bool                         `json:"ArchHasWarnings"`
	ArchWarningsDependency []CheckArchWarningDependency `json:"ArchWarningsDeps"`
	ArchWarningsMatch      []CheckArchWarningMatch      `json:"ArchWarningsNotMatched"`
	ModuleName             string                       `json:"ModuleName"`
}

type CheckArchWarningDependency

type CheckArchWarningDependency struct {
	ComponentName      string    `json:"ComponentName"`
	FileRelativePath   string    `json:"FileRelativePath"`
	FileAbsolutePath   string    `json:"FileAbsolutePath"`
	ResolvedImportName string    `json:"ResolvedImportName"`
	Reference          Reference `json:"-"`
	SourceCodePreview  []byte    `json:"-"`
}

type CheckArchWarningMatch

type CheckArchWarningMatch struct {
	FileRelativePath  string    `json:"FileRelativePath"`
	FileAbsolutePath  string    `json:"FileAbsolutePath"`
	Reference         Reference `json:"-"`
	SourceCodePreview []byte    `json:"-"`
}

type CheckNotice

type CheckNotice struct {
	Text              string `json:"Text"`
	File              string `json:"File"`
	Line              int    `json:"Line"`
	Offset            int    `json:"Offset"`
	SourceCodePreview []byte `json:"-"`
}

type CheckResult

type CheckResult struct {
	DependencyWarnings []CheckArchWarningDependency
	MatchWarnings      []CheckArchWarningMatch
}

type Error

type Error struct {
	Error string `json:"Error"`
}

type FileHold

type FileHold struct {
	File        ProjectFile
	ComponentID *string
}

type FlagsCheck

type FlagsCheck struct {
	Project     ProjectInfo
	MaxWarnings int
}

type FlagsMapping

type FlagsMapping struct {
	Project ProjectInfo
	Scheme  MappingScheme
}

type FlagsRoot

type FlagsRoot struct {
	UseColors         bool
	OutputType        OutputType
	OutputJsonOneLine bool
}

type FlagsSchema

type FlagsSchema struct {
	Version    int
	JSONSchema string
}

type ImportType

type ImportType uint8
const (
	ImportTypeStdLib ImportType = iota
	ImportTypeProject
	ImportTypeVendor
)

type Mapping

type Mapping struct {
	ProjectDirectory string           `json:"ProjectDirectory"`
	ModuleName       string           `json:"ModuleName"`
	MappingGrouped   []MappingGrouped `json:"MappingGrouped"`
	MappingList      []MappingList    `json:"MappingList"`
	Scheme           MappingScheme    `json:"-"`
}

type MappingGrouped

type MappingGrouped struct {
	ComponentName string
	FileNames     []string
}

type MappingList

type MappingList struct {
	FileName      string
	ComponentName string
}

type MappingScheme

type MappingScheme = string
const (
	MappingSchemeGrouped MappingScheme = "grouped"
	MappingSchemeList    MappingScheme = "list"
)

type OutputType

type OutputType = string
const (
	OutputTypeDefault OutputType = "default"
	OutputTypeASCII   OutputType = "ascii"
	OutputTypeJSON    OutputType = "json"
)

type ProjectFile

type ProjectFile struct {
	Path    string
	Imports []ResolvedImport
}

type ProjectInfo

type ProjectInfo struct {
	Directory      string
	GoArchFilePath string
	GoModFilePath  string
	ModuleName     string
}

type Referable

type Referable interface {
	Reference() Reference
}

type Reference

type Reference struct {
	Valid  bool
	File   string
	Line   int
	Offset int
}

type ResolvedImport

type ResolvedImport struct {
	Name       string
	ImportType ImportType
}

type ResolvedPath

type ResolvedPath struct {
	ImportPath string
	LocalPath  string
	AbsPath    string
}

type Schema

type Schema struct {
	Version    int    `json:"Version"`
	JSONSchema string `json:"JsonSchema"`
}

type UserSpaceError

type UserSpaceError struct {
	// contains filtered or unexported fields
}

func NewUserSpaceError

func NewUserSpaceError(msg string) UserSpaceError

func (UserSpaceError) Error

func (u UserSpaceError) Error() string

func (UserSpaceError) Is

func (u UserSpaceError) Is(err error) bool

type Version

type Version struct {
	LinterVersion       string `json:"LinterVersion"`
	GoArchFileSupported string `json:"GoArchFileSupported"`
	BuildTime           string `json:"BuildTime"`
	CommitHash          string `json:"CommitHash"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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