github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/domain/query_test.go (about) 1 package domainTable_test 2 3 import ( 4 structureSpec "github.com/taubyte/go-specs/structure" 5 domainTable "github.com/taubyte/tau-cli/table/domain" 6 ) 7 8 func ExampleQuery_auto() { 9 domain := &structureSpec.Domain{ 10 Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH", 11 Name: "someProject", 12 Description: "this is a domain of some type", 13 Tags: []string{"apple", "orange", "banana"}, 14 Fqdn: "hal.computers.com", 15 CertType: "auto", 16 } 17 18 domainTable.Query(domain) 19 20 // Output: 21 // ┌─────────────┬────────────────────────────────────────────────┐ 22 // │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ 23 // ├─────────────┼────────────────────────────────────────────────┤ 24 // │ Name │ someProject │ 25 // ├─────────────┼────────────────────────────────────────────────┤ 26 // │ Description │ this is a domain of some type │ 27 // ├─────────────┼────────────────────────────────────────────────┤ 28 // │ Tags │ apple, orange, banana │ 29 // ├─────────────┼────────────────────────────────────────────────┤ 30 // │ FQDN │ hal.computers.com │ 31 // ├─────────────┼────────────────────────────────────────────────┤ 32 // │ Cert-Type │ auto │ 33 // └─────────────┴────────────────────────────────────────────────┘ 34 } 35 36 func ExampleQuery_other() { 37 domain := &structureSpec.Domain{ 38 Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH", 39 Name: "someProject", 40 Description: "this is a domain of some type", 41 Tags: []string{"apple", "orange", "banana"}, 42 Fqdn: "hal.computers.com", 43 CertType: "other", 44 KeyFile: "key.txt", 45 CertFile: "cert.txt", 46 } 47 48 domainTable.Query(domain) 49 50 // Output: 51 // ┌─────────────┬────────────────────────────────────────────────┐ 52 // │ ID │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │ 53 // ├─────────────┼────────────────────────────────────────────────┤ 54 // │ Name │ someProject │ 55 // ├─────────────┼────────────────────────────────────────────────┤ 56 // │ Description │ this is a domain of some type │ 57 // ├─────────────┼────────────────────────────────────────────────┤ 58 // │ Tags │ apple, orange, banana │ 59 // ├─────────────┼────────────────────────────────────────────────┤ 60 // │ FQDN │ hal.computers.com │ 61 // ├─────────────┼────────────────────────────────────────────────┤ 62 // │ Cert-Type │ other │ 63 // ├─────────────┼────────────────────────────────────────────────┤ 64 // │ Cert-File │ cert.txt │ 65 // ├─────────────┼────────────────────────────────────────────────┤ 66 // │ Key-File │ key.txt │ 67 // └─────────────┴────────────────────────────────────────────────┘ 68 }