v0_1_0

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 3 Imported by: 1

README

v0_1_0

import "github.com/error-fyi/go-fyi/pkg/types/v0.1.0"

Index

type Error

type Error struct {
    // Unique code of the error. (max: 40 characters)
    Code string `json:"code" yaml:"code" mapstructure:"code"`

    // Detailed description of the error.
    Long *string `json:"long,omitempty" yaml:"long,omitempty" mapstructure:"long,omitempty"`

    // Metadata information about the error.
    Meta *ErrorMeta `json:"meta,omitempty" yaml:"meta,omitempty" mapstructure:"meta,omitempty"`

    // Severity corresponds to the JSON schema field "severity".
    Severity *ErrorSeverity `json:"severity,omitempty" yaml:"severity,omitempty" mapstructure:"severity,omitempty"`

    // Short short of the error. (max: 70 characters)
    Short string `json:"short" yaml:"short" mapstructure:"short"`

    // Suggestions corresponds to the JSON schema field "suggestions".
    Suggestions Suggestions `json:"suggestions,omitempty" yaml:"suggestions,omitempty" mapstructure:"suggestions,omitempty"`

    // Name of the error, to be displayed. (max: 40 characters)
    Title string `json:"title" yaml:"title" mapstructure:"title"`
}

func (*Error) UnmarshalJSON
func (j *Error) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ErrorDefinitions

type ErrorDefinitions map[string]Error

type ErrorMeta

Metadata information about the error.

type ErrorMeta struct {
    // Loc corresponds to the JSON schema field "loc".
    Loc *ErrorMetaLoc `json:"loc,omitempty" yaml:"loc,omitempty" mapstructure:"loc,omitempty"`
}

type ErrorMetaLoc

type ErrorMetaLoc struct {
    // Filename of the file where the error was found
    Filename string `json:"filename" yaml:"filename" mapstructure:"filename"`

    // Line number where the error was defined
    Line int `json:"line" yaml:"line" mapstructure:"line"`
}

func (*ErrorMetaLoc) UnmarshalJSON
func (j *ErrorMetaLoc) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ErrorSeverity

type ErrorSeverity string

const ErrorSeverityLow ErrorSeverity = "low"

const ErrorSeverityMedium ErrorSeverity = "medium"

const ErrorSeveritySevere ErrorSeverity = "severe"

func (*ErrorSeverity) UnmarshalJSON
func (j *ErrorSeverity) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Manifest

type Manifest struct {
    // BaseUrl corresponds to the JSON schema field "base_url".
    BaseUrl string `json:"base_url" yaml:"base_url" mapstructure:"base_url"`

    // Description corresponds to the JSON schema field "description".
    Description *string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`

    // List of the manifest's error definitions.
    ErrorsDefinitions ErrorDefinitions `json:"errors_definitions,omitempty" yaml:"errors_definitions,omitempty" mapstructure:"errors_definitions,omitempty"`

    // Name corresponds to the JSON schema field "name".
    Name string `json:"name" yaml:"name" mapstructure:"name"`

    // Repository corresponds to the JSON schema field "repository".
    Repository string `json:"repository" yaml:"repository" mapstructure:"repository"`

    // Display name of the manifest
    Title *string `json:"title,omitempty" yaml:"title,omitempty" mapstructure:"title,omitempty"`

    // Version corresponds to the JSON schema field "version".
    Version string `json:"version" yaml:"version" mapstructure:"version"`
}

func (*Manifest) UnmarshalJSON
func (j *Manifest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Suggestion

type Suggestion struct {
    // Reference to the document .
    DocRef *string `json:"docRef,omitempty" yaml:"docRef,omitempty" mapstructure:"docRef,omitempty"`

    // Error referenced by the suggestion.
    ErrorCode string `json:"error_code" yaml:"error_code" mapstructure:"error_code"`

    // Unique identifier of the suggestion.
    Id  string `json:"id" yaml:"id" mapstructure:"id"`

    // Short description of the solution.
    Short string `json:"short" yaml:"short" mapstructure:"short"`
}

func (*Suggestion) UnmarshalJSON
func (j *Suggestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Suggestions

type Suggestions map[string]Suggestion

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// Unique code of the error. (max: 40 characters)
	Code string `json:"code" yaml:"code" mapstructure:"code"`

	// Detailed description of the error.
	Long *string `json:"long,omitempty" yaml:"long,omitempty" mapstructure:"long,omitempty"`

	// Metadata information about the error.
	Meta *ErrorMeta `json:"meta,omitempty" yaml:"meta,omitempty" mapstructure:"meta,omitempty"`

	// Severity corresponds to the JSON schema field "severity".
	Severity *ErrorSeverity `json:"severity,omitempty" yaml:"severity,omitempty" mapstructure:"severity,omitempty"`

	// Short short of the error. (max: 70 characters)
	Short string `json:"short" yaml:"short" mapstructure:"short"`

	// Suggestions corresponds to the JSON schema field "suggestions".
	Suggestions Suggestions `json:"suggestions,omitempty" yaml:"suggestions,omitempty" mapstructure:"suggestions,omitempty"`

	// Name of the error, to be displayed. (max: 40 characters)
	Title string `json:"title" yaml:"title" mapstructure:"title"`
}

func (*Error) UnmarshalJSON

func (j *Error) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ErrorDefinitions

type ErrorDefinitions map[string]Error

type ErrorMeta

type ErrorMeta struct {
	// Loc corresponds to the JSON schema field "loc".
	Loc *ErrorMetaLoc `json:"loc,omitempty" yaml:"loc,omitempty" mapstructure:"loc,omitempty"`
}

Metadata information about the error.

type ErrorMetaLoc

type ErrorMetaLoc struct {
	// Filename of the file where the error was found
	Filename string `json:"filename" yaml:"filename" mapstructure:"filename"`

	// Line number where the error was defined
	Line int `json:"line" yaml:"line" mapstructure:"line"`
}

func (*ErrorMetaLoc) UnmarshalJSON

func (j *ErrorMetaLoc) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ErrorSeverity

type ErrorSeverity string
const ErrorSeverityLow ErrorSeverity = "low"
const ErrorSeverityMedium ErrorSeverity = "medium"
const ErrorSeveritySevere ErrorSeverity = "severe"

func (*ErrorSeverity) UnmarshalJSON

func (j *ErrorSeverity) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Manifest

type Manifest struct {
	// BaseUrl corresponds to the JSON schema field "base_url".
	BaseUrl string `json:"base_url" yaml:"base_url" mapstructure:"base_url"`

	// Description corresponds to the JSON schema field "description".
	Description *string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`

	// List of the manifest's error definitions.
	ErrorsDefinitions ErrorDefinitions `json:"errors_definitions,omitempty" yaml:"errors_definitions,omitempty" mapstructure:"errors_definitions,omitempty"`

	// Name corresponds to the JSON schema field "name".
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// Repository corresponds to the JSON schema field "repository".
	Repository string `json:"repository" yaml:"repository" mapstructure:"repository"`

	// Display name of the manifest
	Title *string `json:"title,omitempty" yaml:"title,omitempty" mapstructure:"title,omitempty"`

	// Version corresponds to the JSON schema field "version".
	Version string `json:"version" yaml:"version" mapstructure:"version"`
}

func (*Manifest) UnmarshalJSON

func (j *Manifest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Suggestion

type Suggestion struct {
	// Reference to the document .
	DocRef *string `json:"docRef,omitempty" yaml:"docRef,omitempty" mapstructure:"docRef,omitempty"`

	// Error referenced by the suggestion.
	ErrorCode string `json:"error_code" yaml:"error_code" mapstructure:"error_code"`

	// Unique identifier of the suggestion.
	Id string `json:"id" yaml:"id" mapstructure:"id"`

	// Short description of the solution.
	Short string `json:"short" yaml:"short" mapstructure:"short"`
}

func (*Suggestion) UnmarshalJSON

func (j *Suggestion) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Suggestions

type Suggestions map[string]Suggestion

Jump to

Keyboard shortcuts

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