Files
threshold/internal/host/static/example_test.go
T
shadowdaoandClaude Sonnet 5.5 962d708fdd Rename Go module paths to repo.anhonesthost.net/CyberCoveLLC/threshold
Rename root, api and sdk module paths (imports, go.mod, go_package,
ldflags, build scripts, buf configs) and regenerate protobuf/gateway
code with the project's pinned toolchain. Wire identifiers unchanged.
api gets a local replace for sdk; root/api/sdk require v0.1.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 10:33:41 -07:00

44 lines
1.1 KiB
Go

// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: BUSL-1.1
package static_test
import (
"context"
"fmt"
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/host/static"
)
func ExampleNewHostCatalog() {
projectPublicId := "p_1234"
catalog, _ := static.NewHostCatalog(context.Background(), projectPublicId, static.WithName("my catalog"))
fmt.Println(catalog.Name)
// Output:
// my catalog
}
func ExampleNewHost() {
catalogPublicId := "hcst_1234"
host, _ := static.NewHost(context.Background(), catalogPublicId, static.WithAddress("127.0.0.1"))
fmt.Println(host.Address)
// Output:
// 127.0.0.1
}
func ExampleNewHostSet() {
catalogPublicId := "hcst_1234"
set, _ := static.NewHostSet(context.Background(), catalogPublicId, static.WithName("my host set"))
fmt.Println(set.Name)
// Output:
// my host set
}
func ExampleNewHostSetMember() {
setPublicId := "hsst_11111"
hostPublicId := "hst_22222"
member, _ := static.NewHostSetMember(context.Background(), setPublicId, hostPublicId)
fmt.Println(member.SetId)
fmt.Println(member.HostId)
}