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

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