github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/website/query_test.go (about)

     1  package websiteTable_test
     2  
     3  import (
     4  	structureSpec "github.com/taubyte/go-specs/structure"
     5  	websiteTable "github.com/taubyte/tau-cli/table/website"
     6  )
     7  
     8  func ExampleQuery() {
     9  	website := &structureSpec.Website{
    10  		Id:          "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH",
    11  		Name:        "someProject",
    12  		Description: "this is a website of some type",
    13  		Tags:        []string{"apple", "orange", "banana"},
    14  		Domains:     []string{"hal.computers.com"},
    15  		Paths:       []string{"/"},
    16  		Branch:      "master",
    17  		Provider:    "github",
    18  		RepoID:      "591991",
    19  		RepoName:    "taubyte/example",
    20  	}
    21  
    22  	websiteTable.Query(website)
    23  
    24  	// Output:
    25  	// ┌──────────────┬────────────────────────────────────────────────┐
    26  	// │ ID           │ QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH │
    27  	// ├──────────────┼────────────────────────────────────────────────┤
    28  	// │ Name         │ someProject                                    │
    29  	// ├──────────────┼────────────────────────────────────────────────┤
    30  	// │ Description  │ this is a website of some type                 │
    31  	// ├──────────────┼────────────────────────────────────────────────┤
    32  	// │ Tags         │ apple, orange, banana                          │
    33  	// ├──────────────┼────────────────────────────────────────────────┤
    34  	// │ Paths        │ /                                              │
    35  	// ├──────────────┼────────────────────────────────────────────────┤
    36  	// │ Domains      │ hal.computers.com                              │
    37  	// ├──────────────┼────────────────────────────────────────────────┤
    38  	// │ Repository   │ https://github.com/taubyte/example             │
    39  	// ├──────────────┼────────────────────────────────────────────────┤
    40  	// │  -  Name     │ taubyte/example                                │
    41  	// ├──────────────┼────────────────────────────────────────────────┤
    42  	// │  -  ID       │ 591991                                         │
    43  	// ├──────────────┼────────────────────────────────────────────────┤
    44  	// │  -  Provider │ github                                         │
    45  	// ├──────────────┼────────────────────────────────────────────────┤
    46  	// │  -  Branch   │ master                                         │
    47  	// └──────────────┴────────────────────────────────────────────────┘
    48  }