integrationkey

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InKeySearchOptions added in v0.30.1

type InKeySearchOptions struct {
	Search string `json:"s,omitempty"`
	After  string `json:"a,omitempty"`

	// Omit specifies a list of key ids to exclude from the results.
	Omit []string `json:"o,omitempty"`

	Limit int `json:"-"`
}

InKeySearchOptions allow filtering and paginating the list of rotations.

type IntegrationKey

type IntegrationKey struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Type      Type   `json:"type"`
	ServiceID string `json:"service_id"`
}

func (IntegrationKey) Normalize

func (i IntegrationKey) Normalize() (*IntegrationKey, error)

type Store

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

func NewStore added in v0.30.0

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

func (*Store) Authorize

func (s *Store) Authorize(ctx context.Context, tok authtoken.Token, t Type) (context.Context, error)

func (*Store) Create

func (s *Store) Create(ctx context.Context, i *IntegrationKey) (*IntegrationKey, error)

func (*Store) CreateKeyTx

func (s *Store) CreateKeyTx(ctx context.Context, tx *sql.Tx, i *IntegrationKey) (*IntegrationKey, error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

func (*Store) DeleteManyTx

func (s *Store) DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error

func (*Store) DeleteTx

func (s *Store) DeleteTx(ctx context.Context, tx *sql.Tx, id string) error

func (*Store) FindAllByService

func (s *Store) FindAllByService(ctx context.Context, serviceID string) ([]IntegrationKey, error)

func (*Store) FindOne

func (s *Store) FindOne(ctx context.Context, id string) (*IntegrationKey, error)

func (*Store) GetServiceID

func (s *Store) GetServiceID(ctx context.Context, id string, t Type) (string, error)

func (*Store) Search added in v0.30.1

func (s *Store) Search(ctx context.Context, opts *InKeySearchOptions) ([]IntegrationKey, error)

type Type

type Type string

Type is the entity that needs an integration.

const (
	TypeGrafana                Type = "grafana"
	TypeSite24x7               Type = "site24x7"
	TypePrometheusAlertmanager Type = "prometheusAlertmanager"
	TypeGeneric                Type = "generic"
	TypeEmail                  Type = "email"
)

Types

func (*Type) Scan

func (s *Type) Scan(value interface{}) error

func (Type) Value

func (s Type) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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