buildserver

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(builder *apiv1.Builder, build *apiv1.AcornImageBuild, pushRepo string) (string, error)

func DeleteOld

func DeleteOld(ctx context.Context, c client.Client) error

func ToKey

func ToKey(key string) (result [32]byte, err error)

func ToKeys

func ToKeys(pub, priv string) (pubKey [32]byte, privKey [32]byte, err error)

Types

type Server

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

func NewServer

func NewServer(uuid, namespace string, pubKey, privKey [32]byte, client kclient.WithWatch) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type Token

type Token struct {
	BuilderUUID string                     `json:"builderUUID,omitempty"`
	Time        metav1.Time                `json:"time,omitempty"`
	Build       v1.AcornImageBuildInstance `json:"build,omitempty"`
	PushRepo    string                     `json:"pushRepo,omitempty"`
}

func GetToken

func GetToken(req *http.Request, uuid string, pubKey, privKey *[32]byte) (*Token, error)

Jump to

Keyboard shortcuts

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