types

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HttpEndpointErrorKey = "HTTP_ERROR"
	HandlerStartTime     = "HANDLER_START_TIME"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	CreatedAt  time.Time
	Digest     string
	Skylink    string
	UUID       string
	RangeStart uint32
	RangeEnd   uint32
}

type Catalog

type Catalog struct {
	Repositories []*Repository `json:"repositories"`
}

type Config

type Config struct {
	MediaType  string `json:"mediaType"`
	Digest     string `json:"digest"`
	SkynetLink string `json:"skynetLink"`
	Reference  string `json:"reference"`
	Size       int    `json:"size"`
}

type ConfigV2

type ConfigV2 struct {
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	UUID      string    `json:"uuid,omitempty"`
	Namespace string    `json:"namespace,omitempty"`
	Skylink   string    `json:"sky_link,omitempty"`
	MediaType string    `json:"media_type,omitempty"`
	Reference string    `json:"reference"`
	Digest    string    `json:"digest"`
	Layers    []string  `json:"layers,omitempty"`
	Size      int       `json:"size,omitempty"`
}

type ImageManifest

type ImageManifest struct {
	MediaType     string    `json:"mediaType"`
	Layers        []*Layer  `json:"layers"`
	Config        []*Config `json:"config"`
	SchemaVersion int       `json:"schemaVersion"`
}

type ImageManifestV2

type ImageManifestV2 struct {
	CreatedAt     time.Time `json:"created_at,omitempty"`
	UpdatedAt     time.Time `json:"updated_at,omitempty"`
	Uuid          string    `json:"uuid,omitempty"`
	Namespace     string    `json:"namespace"`
	MediaType     string    `json:"mediaType,omitempty"`
	SchemaVersion int       `json:"schemaVersion,omitempty"`
}

type Layer

type Layer struct {
	MediaType  string `json:"mediaType"`
	Digest     string `json:"digest"`
	SkynetLink string `json:"skynetLink"`
	UUID       string `json:"uuid"`
	Blobs      []Blob `json:"blobs"`
	Size       int    `json:"size"`
}

type LayerRef

type LayerRef struct {
	Digest  string
	Skylink string
}

func (LayerRef) Bytes

func (lr LayerRef) Bytes() []byte

type LayerV2

type LayerV2 struct {
	CreatedAt   time.Time `json:"created_at,omitempty"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
	MediaType   string    `json:"mediaType"`
	Digest      string    `json:"digest"`
	SkynetLink  string    `json:"skynetLink"`
	UUID        string    `json:"uuid"`
	BlobDigests []string  `json:"blobs"`
	Size        int       `json:"size"`
}

type Metadata

type Metadata struct {
	Namespace string
	Manifest  ImageManifest
}

func (Metadata) Bytes

func (md Metadata) Bytes() []byte

func (Metadata) Digests

func (md Metadata) Digests() []string

func (Metadata) FindLayer

func (md Metadata) FindLayer(ref string) *Layer

func (Metadata) FindLinkForDigest

func (md Metadata) FindLinkForDigest(ref string) (string, error)

func (Metadata) GetManifestByRef

func (md Metadata) GetManifestByRef(ref string) (*Config, error)

type OAuthUser

type OAuthUser struct {
	UpdatedAt         time.Time `json:"updated_at"`
	CreatedAt         time.Time `json:"created_at"`
	Location          string    `json:"location"`
	ReceivedEventsURL string    `json:"received_events_url"`
	Email             string    `json:"email"`
	Bio               string    `json:"bio"`
	Type              string    `json:"type"`
	GravatarID        string    `json:"gravatar_id"`
	TwitterUsername   string    `json:"twitter_username"`
	HTMLURL           string    `json:"html_url"`
	Company           string    `json:"company"`
	Login             string    `json:"login"`
	Name              string    `json:"name"`
	NodeID            string    `json:"node_id"`
	OrganizationsURL  string    `json:"organizations_url"`
	AvatarURL         string    `json:"avatar_url"`
	URL               string    `json:"url"`
	FKID              string
	ID                int  `json:"id"`
	Hireable          bool `json:"hireable"`
}

type Password

type Password struct {
	OldPassword string `json:"old_password"`
	NewPassword string `json:"new_password"`
}

type Repository

type Repository struct {
	Namespace string      `json:"namespace"`
	Tags      []*ConfigV2 `json:"tags"`
}

type Session

type Session struct {
	Id           string `json:"id"`
	RefreshToken string `json:"refresh_token"`
	Owner        string `json:"-"`
}

type User

type User struct {
	CreatedAt         time.Time `json:"created_at,omitempty" validate:"-"`
	UpdatedAt         time.Time `json:"updated_at,omitempty" validate:"-"`
	Id                string    `json:"uuid,omitempty" validate:"-"`
	Password          string    `json:"password,omitempty"`
	Username          string    `json:"username,omitempty" validate:"-"`
	Email             string    `json:"email,omitempty" validate:"email"`
	URL               string    `json:"url,omitempty"`
	Company           string    `json:"company,omitempty"`
	ReceivedEventsURL string    `json:"received_events_url,omitempty"`
	Bio               string    `json:"bio,omitempty"`
	Type              string    `json:"type,omitempty"`
	GravatarID        string    `json:"gravatar_id,omitempty"`
	TwitterUsername   string    `json:"twitter_username,omitempty"`
	HTMLURL           string    `json:"html_url,omitempty"`
	Location          string    `json:"location,omitempty"`
	Login             string    `json:"login,omitempty"`
	Name              string    `json:"name,omitempty"`
	NodeID            string    `json:"node_id,omitempty"`
	OrganizationsURL  string    `json:"organizations_url,omitempty"`
	AvatarURL         string    `json:"avatar_url,omitempty"`
	OAuthID           int       `json:"id,omitempty"`
	IsActive          bool      `json:"is_active,omitempty" validate:"-"`
	Hireable          bool      `json:"hireable,omitempty"`
}

func (*User) Bytes

func (u *User) Bytes() ([]byte, error)

func (*User) StripForToken

func (u *User) StripForToken() *User

func (*User) Validate

func (u *User) Validate() error

Jump to

Keyboard shortcuts

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