notice

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notice

type Notice struct {
	Type    Type
	Message string
	Details string
}

type Store

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

Store allows identifying notices for various targets.

func NewStore

func NewStore(ctx context.Context, db *sql.DB) (*Store, error)

NewStore creates a new DB and prepares all necessary SQL statements.

func (*Store) FindAllPolicyNotices

func (s *Store) FindAllPolicyNotices(ctx context.Context, policyID string) ([]Notice, error)

FindAllPolicyNotices sets a notice for a Policy if it is not assigned to any services.

type Type

type Type int

Type NoticeType represents the level of severity of a Notice.

const (
	TypeWarning Type = iota
	TypeError
	TypeInfo
)

Defaults to Warning when unset

func (Type) MarshalGQL

func (t Type) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface

func (Type) String

func (i Type) String() string

func (*Type) UnmarshalGQL

func (t *Type) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements the graphql.Marshaler interface

Jump to

Keyboard shortcuts

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