...

Package api

import "github.com/sigstore/rekor/pkg/api"
Overview
Index

Overview ▾

Index ▾

Variables
func ConfigureAPI(treeID uint)
func CreateLogEntryHandler(params entries.CreateLogEntryParams) middleware.Responder
func CreateLogEntryNotImplementedHandler(_ entries.CreateLogEntryParams) middleware.Responder
func GetLogEntryByIndexHandler(params entries.GetLogEntryByIndexParams) middleware.Responder
func GetLogEntryByIndexNotImplementedHandler(_ entries.GetLogEntryByIndexParams) middleware.Responder
func GetLogEntryByUUIDHandler(params entries.GetLogEntryByUUIDParams) middleware.Responder
func GetLogEntryByUUIDNotImplementedHandler(_ entries.GetLogEntryByUUIDParams) middleware.Responder
func GetLogInfoHandler(params tlog.GetLogInfoParams) middleware.Responder
func GetLogInfoNotImplementedHandler(_ tlog.GetLogInfoParams) middleware.Responder
func GetLogProofHandler(params tlog.GetLogProofParams) middleware.Responder
func GetLogProofNotImplementedHandler(_ tlog.GetLogProofParams) middleware.Responder
func GetPublicKeyHandler(params pubkey.GetPublicKeyParams) middleware.Responder
func GetPublicKeyNotImplementedHandler(_ pubkey.GetPublicKeyParams) middleware.Responder
func NewRedisClient() *redis.Client
func SearchIndexHandler(params index.SearchIndexParams) middleware.Responder
func SearchIndexNotImplementedHandler(_ index.SearchIndexParams) middleware.Responder
func SearchLogQueryHandler(params entries.SearchLogQueryParams) middleware.Responder
func SearchLogQueryNotImplementedHandler(_ entries.SearchLogQueryParams) middleware.Responder
func StopAPI()
type API
    func NewAPI(treeID uint) (*API, error)
type Collection
    func NewCollection(operator string) *Collection
    func (u *Collection) Add(elements []string)
    func (u *Collection) Values() []string
type Uniq
    func NewUniq() Uniq
    func (u Uniq) Add(elements ...string)
    func (u Uniq) Intersect(other Uniq) Uniq
    func (u Uniq) Union(other Uniq) Uniq
    func (u Uniq) Values() []string

Package files

api.go entries.go error.go index.go metrics.go public_key.go tlog.go

Variables

var (
    MetricLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
        Name: "rekor_api_latency",
        Help: "Api Latency on calls",
    }, []string{"path", "code"})

    MetricLatencySummary = promauto.NewSummaryVec(prometheus.SummaryOpts{
        Name: "rekor_api_latency_summary",
        Help: "Api Latency on calls",
    }, []string{"path", "code"})

    MetricRequestLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
        Name: "rekor_latency_by_api",
        Help: "Api Latency (in ns) by path and method",
        Buckets: prometheus.ExponentialBucketsRange(
            float64(time.Millisecond),
            float64(4*time.Second),
            10),
    }, []string{"path", "method"})

    MetricRequestCount = promauto.NewCounterVec(prometheus.CounterOpts{
        Name: "rekor_qps_by_api",
        Help: "Api QPS by path, method, and response code",
    }, []string{"path", "method", "code"})

    CheckpointPublishCount = promauto.NewCounterVec(prometheus.CounterOpts{
        Name: "rekor_checkpoint_publish",
        Help: "Checkpoint publishing by shard and code",
    }, []string{"shard", "code"})
)
var ErrNotFound = errors.New("grpc returned 0 leaves with success code")

func ConfigureAPI

func ConfigureAPI(treeID uint)

func CreateLogEntryHandler

func CreateLogEntryHandler(params entries.CreateLogEntryParams) middleware.Responder

CreateLogEntryHandler creates new entry into log

func CreateLogEntryNotImplementedHandler

func CreateLogEntryNotImplementedHandler(_ entries.CreateLogEntryParams) middleware.Responder

func GetLogEntryByIndexHandler

func GetLogEntryByIndexHandler(params entries.GetLogEntryByIndexParams) middleware.Responder

GetLogEntryAndProofByIndexHandler returns the entry and inclusion proof for a specified log index

func GetLogEntryByIndexNotImplementedHandler

func GetLogEntryByIndexNotImplementedHandler(_ entries.GetLogEntryByIndexParams) middleware.Responder

func GetLogEntryByUUIDHandler

func GetLogEntryByUUIDHandler(params entries.GetLogEntryByUUIDParams) middleware.Responder

GetLogEntryByUUIDHandler gets log entry and inclusion proof for specified UUID aka merkle leaf hash

func GetLogEntryByUUIDNotImplementedHandler

func GetLogEntryByUUIDNotImplementedHandler(_ entries.GetLogEntryByUUIDParams) middleware.Responder

func GetLogInfoHandler

func GetLogInfoHandler(params tlog.GetLogInfoParams) middleware.Responder

GetLogInfoHandler returns the current size of the tree and the STH

func GetLogInfoNotImplementedHandler

func GetLogInfoNotImplementedHandler(_ tlog.GetLogInfoParams) middleware.Responder

func GetLogProofHandler

func GetLogProofHandler(params tlog.GetLogProofParams) middleware.Responder

GetLogProofHandler returns information required to compute a consistency proof between two snapshots of log

func GetLogProofNotImplementedHandler

func GetLogProofNotImplementedHandler(_ tlog.GetLogProofParams) middleware.Responder

func GetPublicKeyHandler

func GetPublicKeyHandler(params pubkey.GetPublicKeyParams) middleware.Responder

func GetPublicKeyNotImplementedHandler

func GetPublicKeyNotImplementedHandler(_ pubkey.GetPublicKeyParams) middleware.Responder

func NewRedisClient

func NewRedisClient() *redis.Client

func SearchIndexHandler

func SearchIndexHandler(params index.SearchIndexParams) middleware.Responder

func SearchIndexNotImplementedHandler

func SearchIndexNotImplementedHandler(_ index.SearchIndexParams) middleware.Responder

func SearchLogQueryHandler

func SearchLogQueryHandler(params entries.SearchLogQueryParams) middleware.Responder

SearchLogQueryHandler searches log by index, UUID, or proposed entry and returns array of entries found with inclusion proofs

func SearchLogQueryNotImplementedHandler

func SearchLogQueryNotImplementedHandler(_ entries.SearchLogQueryParams) middleware.Responder

func StopAPI

func StopAPI()

type API

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

func NewAPI

func NewAPI(treeID uint) (*API, error)

type Collection

Collection is a collection of sets.

its resulting values is a union or intersection of all the sets, depending on the operator.

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

func NewCollection

func NewCollection(operator string) *Collection

NewCollection creates a new collection.

func (*Collection) Add

func (u *Collection) Add(elements []string)

Add adds the elements into a new subset in the collection.

func (*Collection) Values

func (u *Collection) Values() []string

Values flattens the subsets using the operator, and returns the collection as a slice of strings.

type Uniq

Uniq is a collection of unique elements.

type Uniq map[string]struct{}

func NewUniq

func NewUniq() Uniq

func (Uniq) Add

func (u Uniq) Add(elements ...string)

func (Uniq) Intersect

func (u Uniq) Intersect(other Uniq) Uniq

Intersect returns the intersection of two collections.

func (Uniq) Union

func (u Uniq) Union(other Uniq) Uniq

Union returns the union of two collections.

func (Uniq) Values

func (u Uniq) Values() []string