model

package
v0.0.0-...-8115ff7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessCred

type AccessCred struct {
	AccessKey    string
	AccessSecret string
}

AccessCred contains credential data for accessing the harbor server

func (*AccessCred) FillIn

func (ac *AccessCred) FillIn(secret *corev1.Secret) error

FillIn put secret into AccessCred

func (*AccessCred) Validate

func (ac *AccessCred) Validate(secret *corev1.Secret) error

Validate validates wether the key and secret has correct format

type HarborClient

type HarborClient struct {
	Client *hc.Harbor
	Auth   gruntime.ClientAuthInfoWriter
}

HarborClient keeps Harbor client

type HarborClientV2

type HarborClientV2 struct {
	Client *hc2.Harbor
	Auth   gruntime.ClientAuthInfoWriter
}

HarborClientV2 keeps Harbor client v2

type HarborServer

type HarborServer struct {
	ServerURL  string
	AccessCred *AccessCred
	InSecure   bool
}

HarborServer contains connection data

func NewHarborServer

func NewHarborServer(serverURL string, accessCred *AccessCred, insecure bool) *HarborServer

NewHarborServer returns harbor server with inputs

func (*HarborServer) Client

func (h *HarborServer) Client() *HarborClient

Client created based on the server data

func (*HarborServer) ClientV2

func (h *HarborServer) ClientV2() *HarborClientV2

ClientV2 created based on the server data. Harbor V2 API

type Robot

type Robot struct {
	ID    int64
	Name  string
	Token string
}

Robot contains info of robot account

Jump to

Keyboard shortcuts

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