Skip to content

This project is a Library to validate a pull secret

Notifications You must be signed in to change notification settings

RHsyseng/lib-ps-validator

Repository files navigation

lib-ps-validator

gopherbadger-tag-do-not-edit

Disclaimer

This repository and its contents are completely UNSUPPORTED in any way and are not part of official documentation.

Description

This is a go library created to validate a pull secret keeping in mind the next concepts:

  • Inputs: [] byte (with the pull secret in json format)
  • Output: Struct of interfaces with the information structured in 3 parts:
    • Valid Entries
    • Expired Entries
    • Connection Issues (Sometimes could be an internal registry with some problems to be connected)

img.png

How to use it

There are two repo to consume the library. One of them is for the WebUI deployed just for internal staff engineering:

And the second one is a CLI to use in your vm,host, instance, even inside your CI/CD pipeline:

How to use it (as a developer)

Just import or get the package using this command:

go get github.com/RHsyseng/lib-ps-validator
import github.com/RHsyseng/lib-ps-validator

Main function is:

func Validate(input []byte) WebData 

Where the WebData is the model:

type WebData struct {
	Input     interface{}
	ResultOK  interface{}
	ResultKO  interface{}
	ResultCon interface{}
}

About

This project is a Library to validate a pull secret

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages