domainTable

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(ctx *cli.Context, domain *structureSpec.Domain, prompt string) bool

func GetRegisterTable

func GetRegisterTable(response client.DomainResponse) string

func List

func List(domains []*structureSpec.Domain)
Example
package main

import (
	structureSpec "github.com/taubyte/go-specs/structure"
	domainTable "github.com/taubyte/tau-cli/table/domain"
)

func main() {
	domains := []*structureSpec.Domain{
		{
			Id:   "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
			Name: "someDomain1",
			Fqdn: "hal.computers.com",
		},
		{
			Id:   "QmbUIDhRosp5BaXDASEWSCtpkQCgQCPdRVhnxjiSHfXdC0",
			Name: "someDomain2",
			Fqdn: "hal.computers.org",
		},
	}

	domainTable.List(domains)

}
Output:

┌─────────────────┬─────────────┬───────────────────┐
│ ID              │ NAME        │ FQDN              │
├─────────────────┼─────────────┼───────────────────┤
│ QmbAA8...HfXdWH │ someDomain1 │ hal.computers.com │
├─────────────────┼─────────────┼───────────────────┤
│ QmbUID...HfXdC0 │ someDomain2 │ hal.computers.org │
└─────────────────┴─────────────┴───────────────────┘

func Query

func Query(domain *structureSpec.Domain)
Example (Auto)
package main

import (
	structureSpec "github.com/taubyte/go-specs/structure"
	domainTable "github.com/taubyte/tau-cli/table/domain"
)

func main() {
	domain := &structureSpec.Domain{
		Id:          "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
		Name:        "someProject",
		Description: "this is a domain of some type",
		Tags:        []string{"apple", "orange", "banana"},
		Fqdn:        "hal.computers.com",
		CertType:    "auto",
	}

	domainTable.Query(domain)

}
Output:

┌─────────────┬────────────────────────────────────────────────┐
│ ID          │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │
├─────────────┼────────────────────────────────────────────────┤
│ Name        │ someProject                                    │
├─────────────┼────────────────────────────────────────────────┤
│ Description │ this is a domain of some type                  │
├─────────────┼────────────────────────────────────────────────┤
│ Tags        │ apple, orange, banana                          │
├─────────────┼────────────────────────────────────────────────┤
│ FQDN        │ hal.computers.com                              │
├─────────────┼────────────────────────────────────────────────┤
│ Cert-Type   │ auto                                           │
└─────────────┴────────────────────────────────────────────────┘
Example (Other)
package main

import (
	structureSpec "github.com/taubyte/go-specs/structure"
	domainTable "github.com/taubyte/tau-cli/table/domain"
)

func main() {
	domain := &structureSpec.Domain{
		Id:          "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
		Name:        "someProject",
		Description: "this is a domain of some type",
		Tags:        []string{"apple", "orange", "banana"},
		Fqdn:        "hal.computers.com",
		CertType:    "other",
		KeyFile:     "key.txt",
		CertFile:    "cert.txt",
	}

	domainTable.Query(domain)

}
Output:

┌─────────────┬────────────────────────────────────────────────┐
│ ID          │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │
├─────────────┼────────────────────────────────────────────────┤
│ Name        │ someProject                                    │
├─────────────┼────────────────────────────────────────────────┤
│ Description │ this is a domain of some type                  │
├─────────────┼────────────────────────────────────────────────┤
│ Tags        │ apple, orange, banana                          │
├─────────────┼────────────────────────────────────────────────┤
│ FQDN        │ hal.computers.com                              │
├─────────────┼────────────────────────────────────────────────┤
│ Cert-Type   │ other                                          │
├─────────────┼────────────────────────────────────────────────┤
│ Cert-File   │ cert.txt                                       │
├─────────────┼────────────────────────────────────────────────┤
│ Key-File    │ key.txt                                        │
└─────────────┴────────────────────────────────────────────────┘

func Registered

func Registered(fqdn string, resp client.DomainResponse)

Types

This section is empty.

Jump to

Keyboard shortcuts

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