lib

package
v0.0.0-...-946bc13 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Repoes = reposervice{}

repoes service

Functions

func CallRegistryApi

func CallRegistryApi(method string, api string, headers map[string]string, body map[string]any, rspv any) (http.Header, []byte, error)

public call for cmd debug

func Init

func Init(confFilePath string) (*viper.Viper, *zap.SugaredLogger)

Types

type Image

type Image struct {
	Digest string   `json:"digest"` // digest
	Arch   string   `json:"arch"`   // cpu arch
	Os     string   `json:"os"`     // os
	Size   int64    `json:"size"`   // size B
	Layers []*Layer `json:"layers"` // layers
}

os/arch specified image may have multiple layers

type Layer

type Layer struct {
	Script string `json:"script"` // script
	Size   int64  `json:"size"`   // size B
}

layer

type Repo

type Repo struct {
	Name       string `json:"name"`        // name
	Desc       string `json:"desc"`        // desc
	LastUpdate int64  `json:"last_update"` // last update
	Tags       []*Tag `json:"tags"`        // tags
}

Repository is a collection of images, each of which may have multiple tags.

func GetRegistryRepoDetail

func GetRegistryRepoDetail(name string) (*Repo, error)

public get repo detail for cmd debug

type Tag

type Tag struct {
	Name      string   `json:"name"`       // name
	Created   int64    `json:"created"`    // created unix timestamp
	ChangeLog string   `json:"change_log"` // change log
	Images    []*Image `json:"images"`     // images
}

tag may have multiple images for different os/arch

Jump to

Keyboard shortcuts

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