Files
signoz/pkg/valuer/valuer.go
Vikrant Gupta 245179cbf7 feat(authz): openfga sql migration (#9580)
* feat(authz): openfga sql migration

* feat(authz): formatting and naming

* feat(authz): formatting and naming

* feat(authz): extract function for store and model id

* feat(authz): reorder the provider
2025-11-14 00:43:02 +05:30

46 lines
1.1 KiB
Go

package valuer
import (
"database/sql"
"database/sql/driver"
"encoding"
"encoding/json"
"fmt"
"github.com/SigNoz/signoz/pkg/errors"
)
var (
ErrCodeUnknownValuerScan = errors.MustNewCode("unknown_valuer_scan")
ErrCodeInvalidValuer = errors.MustNewCode("invalid_valuer")
)
type Valuer interface {
// IsZero returns true if the value is considered empty or zero
IsZero() bool
// StringValue returns the string representation of the value
StringValue() string
// MarshalJSON returns the JSON encoding of the value.
json.Marshaler
// UnmarshalJSON returns the JSON decoding of the value.
json.Unmarshaler
// Scan into underlying struct from a database driver's value
sql.Scanner
// Convert the struct to a database driver's value
driver.Valuer
// Implement fmt.Stringer to allow the value to be printed as a string
fmt.Stringer
// Implement encoding.TextUnmarshaler to allow the value to be unmarshalled from a string
encoding.TextUnmarshaler
// Implement encoding.TextUnmarshaler to allow the value to be marshalled unto a string
encoding.TextMarshaler
}