buildClient

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeHmac256

func ComputeHmac256(message string, secret string) (string, error)

Types

type Client

type Client interface {
	Upload([]*buildsecurity.Result, map[string]string) error
	GetPoliciesForRepository() ([]*buildsecurity.Policy, error)
	GetOrCreateRepository() (string, error)
}

func Get

func Get(scanPath string, c *cli.Context) (Client, error)

type Response

type Response struct {
	Status  int      `json:"status"`
	Message string   `json:"message"`
	Data    string   `json:"data,omitempty"`
	Errors  []string `json:"errors,omitempty"`
}

type TwirpClient

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

func (*TwirpClient) GetOrCreateRepository

func (bc *TwirpClient) GetOrCreateRepository() (string, error)

func (*TwirpClient) GetPoliciesForRepository

func (bc *TwirpClient) GetPoliciesForRepository() ([]*buildsecurity.Policy, error)

func (*TwirpClient) Upload

func (bc *TwirpClient) Upload(results []*buildsecurity.Result, tags map[string]string) error

Jump to

Keyboard shortcuts

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