Skip to content

fathom

import "github.com/KrakenNet/fathom-go"

Package fathom provides a Go client for the Fathom policy engine REST API.

Index

Variables

ErrRulesetReloaded is returned by the SubscribeChanges stream when the server aborts it because the engine's ruleset was hot-reloaded (ADR-0002, option a — cancel on swap). It is errors.Is-able: callers should treat it as a normal lifecycle event, re-subscribe to bind to the new ruleset, then re-Query to re-synchronize.

var ErrRulesetReloaded = errors.New("fathom: ruleset reloaded; re-subscribe to bind to the new ruleset")

type AssertFactRequest

AssertFactRequest is the payload for POST /v1/facts.

type AssertFactRequest struct {
    SessionID string         `json:"session_id"`
    Template  string         `json:"template"`
    Data      map[string]any `json:"data"`
}

type AssertFactResponse

AssertFactResponse is the response from POST /v1/facts.

type AssertFactResponse struct {
    Success bool `json:"success"`
}

type ChangeType

ChangeType mirrors the proto's fact-change kinds.

type ChangeType int32

const (
    ChangeTypeUnspecified ChangeType = iota
    ChangeTypeAssert
    ChangeTypeRetract
)

type Client

Client communicates with the Fathom REST API.

type Client struct {
    // contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL string, opts ...ClientOption) *Client

NewClient creates a new Fathom client pointing at the given base URL. Example:

client := NewClient("http://localhost:8000", WithBearerToken("secret"))

func (*Client) AssertFact

func (c *Client) AssertFact(ctx context.Context, req *AssertFactRequest) (*AssertFactResponse, error)

AssertFact asserts a single fact into the session's working memory.

func (*Client) Evaluate

func (c *Client) Evaluate(ctx context.Context, req *EvaluateRequest) (*EvaluateResponse, error)

Evaluate sends facts to the engine and returns the policy decision.

func (*Client) Query

func (c *Client) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)

Query retrieves facts from the session's working memory.

func (*Client) Retract

func (c *Client) Retract(ctx context.Context, req *RetractRequest) (*RetractResponse, error)

Retract removes facts matching the request's template + optional filter from the session's working memory and returns the number of retractions.

type ClientOption

ClientOption mutates a Client during construction.

type ClientOption func(*Client)

func WithBearerToken

func WithBearerToken(tok string) ClientOption

WithBearerToken configures the client to send "Authorization: Bearer \<tok>" on every request.

func WithHTTPClient

func WithHTTPClient(hc *http.Client) ClientOption

WithHTTPClient overrides the underlying *http.Client (useful for tests or custom transports).

type EvaluateRequest

EvaluateRequest is the payload for POST /v1/evaluate.

type EvaluateRequest struct {
    Facts     []FactInput `json:"facts"`
    Ruleset   string      `json:"ruleset"`
    SessionID string      `json:"session_id,omitempty"`
}

type EvaluateResponse

EvaluateResponse is the response from POST /v1/evaluate.

type EvaluateResponse struct {
    Decision         string   `json:"decision"`
    Reason           string   `json:"reason"`
    RuleTrace        []string `json:"rule_trace"`
    ModuleTrace      []string `json:"module_trace"`
    DurationUS       int64    `json:"duration_us"`
    AttestationToken string   `json:"attestation_token,omitempty"`
}

type FactChangeEvent

FactChangeEvent is a single working-memory change yielded by SubscribeChanges. DataJSON's slot data is decoded into Data for convenience.

type FactChangeEvent struct {
    ChangeType ChangeType
    Template   string
    Data       map[string]any
}

type FactInput

FactInput is a single fact assertion used inside EvaluateRequest.

type FactInput struct {
    Template string         `json:"template"`
    Data     map[string]any `json:"data"`
}

type GRPCClient

GRPCClient is an idiomatic wrapper around the generated FathomService gRPC stub. It mirrors the REST Client's request/response shapes (map[string]any fact data) while transparently handling the proto's JSON-encoded string fields, bearer-token metadata, and the SubscribeChanges reload contract.

type GRPCClient struct {
    // contains filtered or unexported fields
}

func NewGRPCClient

func NewGRPCClient(target string, opts ...GRPCOption) (*GRPCClient, error)

NewGRPCClient dials target and returns a ready-to-use GRPCClient. The caller owns the connection and must Close it when done.

Example:

c, err := NewGRPCClient("localhost:50051",
    WithGRPCBearerToken("secret"), WithGRPCInsecure())
if err != nil { ... }
defer c.Close()

func (*GRPCClient) AssertFact

func (c *GRPCClient) AssertFact(ctx context.Context, req *AssertFactRequest) (*AssertFactResponse, error)

AssertFact asserts a single fact into the session's working memory.

func (*GRPCClient) Close

func (c *GRPCClient) Close() error

Close releases the underlying gRPC connection.

func (*GRPCClient) Evaluate

func (c *GRPCClient) Evaluate(ctx context.Context, req *EvaluateRequest) (*EvaluateResponse, error)

Evaluate sends facts to the engine and returns the policy decision. The EvaluateRequest/EvaluateResponse types are the REST client's shapes; fact Data maps are JSON-encoded into the proto's data_json fields internally.

Note: unlike the REST EvaluateResponse, the gRPC EvaluateResponse carries no attestation_token (the proto omits it), so that field is always empty here.

func (*GRPCClient) Query

func (c *GRPCClient) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)

Query retrieves facts from the session's working memory.

func (*GRPCClient) Reload

func (c *GRPCClient) Reload(ctx context.Context, req *ReloadRequest) (*ReloadResponse, error)

Reload hot-reloads the engine's ruleset from an inline YAML body or a server-side path. A successful reload aborts every in-flight SubscribeChanges stream with ErrRulesetReloaded (ADR-0002).

func (*GRPCClient) Retract

func (c *GRPCClient) Retract(ctx context.Context, req *RetractRequest) (*RetractResponse, error)

Retract removes facts matching the request's template + optional filter and returns the number of retractions.

func (*GRPCClient) SubscribeChanges

func (c *GRPCClient) SubscribeChanges(ctx context.Context, sessionID string, fn func(FactChangeEvent) error) error

SubscribeChanges opens a server stream of working-memory changes for the given session and invokes fn for each event. It blocks until one of:

  • fn returns a non-nil error (returned as-is),
  • the server aborts the stream because the ruleset was reloaded (returns ErrRulesetReloaded; re-subscribe + re-Query),
  • the stream ends cleanly (server EOF or ctx cancellation; returns nil),
  • any other gRPC error (returned wrapped).

Plain client-side cancellation (ctx cancel / deadline) and a clean server close both return nil — they are not surfaced as ErrRulesetReloaded.

type GRPCOption

GRPCOption configures a GRPCClient during construction.

type GRPCOption func(*grpcConfig)

func WithDialOptions

func WithDialOptions(opts ...grpc.DialOption) GRPCOption

WithDialOptions appends raw grpc.DialOption values, an escape hatch for transport credentials, interceptors, keepalive, etc. These are applied after the wrapper's own defaults, so they win on conflict.

func WithGRPCBearerToken

func WithGRPCBearerToken(tok string) GRPCOption

WithGRPCBearerToken attaches "authorization: Bearer \<tok>" metadata to every RPC via per-RPC credentials (mirroring the server's bearer-auth contract).

gRPC refuses to send per-RPC credentials over an insecure transport unless the caller has explicitly opted in via WithGRPCInsecure (mirroring the server's FATHOM_GRPC_ALLOW_INSECURE posture). With a secure transport this restriction does not apply.

func WithGRPCInsecure

func WithGRPCInsecure() GRPCOption

WithGRPCInsecure permits an insecure (plaintext) transport and allows bearer credentials to be sent over it. This mirrors the server's FATHOM_GRPC_ALLOW_INSECURE=1 escape hatch and should only be used for local development or trusted networks.

When not set, NewGRPCClient defaults to TLS transport credentials.

type QueryRequest

QueryRequest is the payload for POST /v1/query.

type QueryRequest struct {
    SessionID string         `json:"session_id"`
    Template  string         `json:"template"`
    Filter    map[string]any `json:"filter,omitempty"`
}

type QueryResponse

QueryResponse is the response from POST /v1/query.

type QueryResponse struct {
    Facts []map[string]any `json:"facts"`
}

type ReloadRequest

ReloadRequest is the payload for the Reload RPC. Exactly one of RulesetPath or RulesetYAML should be set (mirroring the proto's oneof source). Signature is the optional detached signature bytes for the ruleset.

type ReloadRequest struct {
    RulesetPath string
    RulesetYAML string
    Signature   []byte
}

type ReloadResponse

ReloadResponse is the response from the Reload RPC.

type ReloadResponse struct {
    RulesetHashBefore string
    RulesetHashAfter  string
    AttestationToken  string
}

type RetractRequest

RetractRequest is the payload for DELETE /v1/facts.

type RetractRequest struct {
    SessionID string         `json:"session_id"`
    Template  string         `json:"template"`
    Filter    map[string]any `json:"filter,omitempty"`
}

type RetractResponse

RetractResponse is the response from DELETE /v1/facts.

type RetractResponse struct {
    RetractedCount int `json:"retracted_count"`
}

fathomv1

import "github.com/KrakenNet/fathom-go/proto"

Index

Constants

const (
    FathomService_Evaluate_FullMethodName         = "/fathom.v1.FathomService/Evaluate"
    FathomService_AssertFact_FullMethodName       = "/fathom.v1.FathomService/AssertFact"
    FathomService_Query_FullMethodName            = "/fathom.v1.FathomService/Query"
    FathomService_Retract_FullMethodName          = "/fathom.v1.FathomService/Retract"
    FathomService_SubscribeChanges_FullMethodName = "/fathom.v1.FathomService/SubscribeChanges"
    FathomService_Reload_FullMethodName           = "/fathom.v1.FathomService/Reload"
)

Variables

Enum value maps for ChangeType.

var (
    ChangeType_name = map[int32]string{
        0:  "CHANGE_TYPE_UNSPECIFIED",
        1:  "ASSERT",
        2:  "RETRACT",
    }
    ChangeType_value = map[string]int32{
        "CHANGE_TYPE_UNSPECIFIED": 0,
        "ASSERT":                  1,
        "RETRACT":                 2,
    }
)

FathomService_ServiceDesc is the grpc.ServiceDesc for FathomService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

var FathomService_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "fathom.v1.FathomService",
    HandlerType: (*FathomServiceServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "Evaluate",
            Handler:    _FathomService_Evaluate_Handler,
        },
        {
            MethodName: "AssertFact",
            Handler:    _FathomService_AssertFact_Handler,
        },
        {
            MethodName: "Query",
            Handler:    _FathomService_Query_Handler,
        },
        {
            MethodName: "Retract",
            Handler:    _FathomService_Retract_Handler,
        },
        {
            MethodName: "Reload",
            Handler:    _FathomService_Reload_Handler,
        },
    },
    Streams: []grpc.StreamDesc{
        {
            StreamName:    "SubscribeChanges",
            Handler:       _FathomService_SubscribeChanges_Handler,
            ServerStreams: true,
        },
    },
    Metadata: "fathom.proto",
}

var File_fathom_proto protoreflect.FileDescriptor

func RegisterFathomServiceServer

func RegisterFathomServiceServer(s grpc.ServiceRegistrar, srv FathomServiceServer)

type AssertFactRequest

type AssertFactRequest struct {
    SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
    Template  string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
    // JSON-encoded slot data.
    DataJson string `protobuf:"bytes,3,opt,name=data_json,json=dataJson,proto3" json:"data_json,omitempty"`
    // contains filtered or unexported fields
}

func (*AssertFactRequest) Descriptor

func (*AssertFactRequest) Descriptor() ([]byte, []int)

Deprecated: Use AssertFactRequest.ProtoReflect.Descriptor instead.

func (*AssertFactRequest) GetDataJson

func (x *AssertFactRequest) GetDataJson() string

func (*AssertFactRequest) GetSessionId

func (x *AssertFactRequest) GetSessionId() string

func (*AssertFactRequest) GetTemplate

func (x *AssertFactRequest) GetTemplate() string

func (*AssertFactRequest) ProtoMessage

func (*AssertFactRequest) ProtoMessage()

func (*AssertFactRequest) ProtoReflect

func (x *AssertFactRequest) ProtoReflect() protoreflect.Message

func (*AssertFactRequest) Reset

func (x *AssertFactRequest) Reset()

func (*AssertFactRequest) String

func (x *AssertFactRequest) String() string

type AssertFactResponse

type AssertFactResponse struct {
    Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
    // contains filtered or unexported fields
}

func (*AssertFactResponse) Descriptor

func (*AssertFactResponse) Descriptor() ([]byte, []int)

Deprecated: Use AssertFactResponse.ProtoReflect.Descriptor instead.

func (*AssertFactResponse) GetSuccess

func (x *AssertFactResponse) GetSuccess() bool

func (*AssertFactResponse) ProtoMessage

func (*AssertFactResponse) ProtoMessage()

func (*AssertFactResponse) ProtoReflect

func (x *AssertFactResponse) ProtoReflect() protoreflect.Message

func (*AssertFactResponse) Reset

func (x *AssertFactResponse) Reset()

func (*AssertFactResponse) String

func (x *AssertFactResponse) String() string

type ChangeType

type ChangeType int32

const (
    ChangeType_CHANGE_TYPE_UNSPECIFIED ChangeType = 0
    ChangeType_ASSERT                  ChangeType = 1
    ChangeType_RETRACT                 ChangeType = 2
)

func (ChangeType) Descriptor

func (ChangeType) Descriptor() protoreflect.EnumDescriptor

func (ChangeType) Enum

func (x ChangeType) Enum() *ChangeType

func (ChangeType) EnumDescriptor

func (ChangeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChangeType.Descriptor instead.

func (ChangeType) Number

func (x ChangeType) Number() protoreflect.EnumNumber

func (ChangeType) String

func (x ChangeType) String() string

func (ChangeType) Type

func (ChangeType) Type() protoreflect.EnumType

type EvaluateRequest

type EvaluateRequest struct {
    SessionId string       `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
    Ruleset   string       `protobuf:"bytes,2,opt,name=ruleset,proto3" json:"ruleset,omitempty"`
    Facts     []*FactInput `protobuf:"bytes,3,rep,name=facts,proto3" json:"facts,omitempty"`
    // contains filtered or unexported fields
}

func (*EvaluateRequest) Descriptor

func (*EvaluateRequest) Descriptor() ([]byte, []int)

Deprecated: Use EvaluateRequest.ProtoReflect.Descriptor instead.

func (*EvaluateRequest) GetFacts

func (x *EvaluateRequest) GetFacts() []*FactInput

func (*EvaluateRequest) GetRuleset

func (x *EvaluateRequest) GetRuleset() string

func (*EvaluateRequest) GetSessionId

func (x *EvaluateRequest) GetSessionId() string

func (*EvaluateRequest) ProtoMessage

func (*EvaluateRequest) ProtoMessage()

func (*EvaluateRequest) ProtoReflect

func (x *EvaluateRequest) ProtoReflect() protoreflect.Message

func (*EvaluateRequest) Reset

func (x *EvaluateRequest) Reset()

func (*EvaluateRequest) String

func (x *EvaluateRequest) String() string

type EvaluateResponse

type EvaluateResponse struct {
    Decision    string   `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"`
    Reason      string   `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
    RuleTrace   []string `protobuf:"bytes,3,rep,name=rule_trace,json=ruleTrace,proto3" json:"rule_trace,omitempty"`
    ModuleTrace []string `protobuf:"bytes,4,rep,name=module_trace,json=moduleTrace,proto3" json:"module_trace,omitempty"`
    DurationUs  int64    `protobuf:"varint,5,opt,name=duration_us,json=durationUs,proto3" json:"duration_us,omitempty"`
    // contains filtered or unexported fields
}

func (*EvaluateResponse) Descriptor

func (*EvaluateResponse) Descriptor() ([]byte, []int)

Deprecated: Use EvaluateResponse.ProtoReflect.Descriptor instead.

func (*EvaluateResponse) GetDecision

func (x *EvaluateResponse) GetDecision() string

func (*EvaluateResponse) GetDurationUs

func (x *EvaluateResponse) GetDurationUs() int64

func (*EvaluateResponse) GetModuleTrace

func (x *EvaluateResponse) GetModuleTrace() []string

func (*EvaluateResponse) GetReason

func (x *EvaluateResponse) GetReason() string

func (*EvaluateResponse) GetRuleTrace

func (x *EvaluateResponse) GetRuleTrace() []string

func (*EvaluateResponse) ProtoMessage

func (*EvaluateResponse) ProtoMessage()

func (*EvaluateResponse) ProtoReflect

func (x *EvaluateResponse) ProtoReflect() protoreflect.Message

func (*EvaluateResponse) Reset

func (x *EvaluateResponse) Reset()

func (*EvaluateResponse) String

func (x *EvaluateResponse) String() string

type FactChange

type FactChange struct {
    ChangeType ChangeType `protobuf:"varint,1,opt,name=change_type,json=changeType,proto3,enum=fathom.v1.ChangeType" json:"change_type,omitempty"`
    Template   string     `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
    // JSON-encoded slot data of the changed fact.
    DataJson string `protobuf:"bytes,3,opt,name=data_json,json=dataJson,proto3" json:"data_json,omitempty"`
    // contains filtered or unexported fields
}

func (*FactChange) Descriptor

func (*FactChange) Descriptor() ([]byte, []int)

Deprecated: Use FactChange.ProtoReflect.Descriptor instead.

func (*FactChange) GetChangeType

func (x *FactChange) GetChangeType() ChangeType

func (*FactChange) GetDataJson

func (x *FactChange) GetDataJson() string

func (*FactChange) GetTemplate

func (x *FactChange) GetTemplate() string

func (*FactChange) ProtoMessage

func (*FactChange) ProtoMessage()

func (*FactChange) ProtoReflect

func (x *FactChange) ProtoReflect() protoreflect.Message

func (*FactChange) Reset

func (x *FactChange) Reset()

func (*FactChange) String

func (x *FactChange) String() string

type FactInput

type FactInput struct {
    Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
    // JSON-encoded slot data (e.g. {"tool_name": "bash", "agent_id": "a1"}).
    DataJson string `protobuf:"bytes,2,opt,name=data_json,json=dataJson,proto3" json:"data_json,omitempty"`
    // contains filtered or unexported fields
}

func (*FactInput) Descriptor

func (*FactInput) Descriptor() ([]byte, []int)

Deprecated: Use FactInput.ProtoReflect.Descriptor instead.

func (*FactInput) GetDataJson

func (x *FactInput) GetDataJson() string

func (*FactInput) GetTemplate

func (x *FactInput) GetTemplate() string

func (*FactInput) ProtoMessage

func (*FactInput) ProtoMessage()

func (*FactInput) ProtoReflect

func (x *FactInput) ProtoReflect() protoreflect.Message

func (*FactInput) Reset

func (x *FactInput) Reset()

func (*FactInput) String

func (x *FactInput) String() string

type FathomServiceClient

FathomServiceClient is the client API for FathomService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type FathomServiceClient interface {
    // Evaluate asserted facts against loaded rules and return a decision.
    Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error)
    // Assert one or more facts into working memory.
    AssertFact(ctx context.Context, in *AssertFactRequest, opts ...grpc.CallOption) (*AssertFactResponse, error)
    // Query working memory for facts matching a template and optional filter.
    Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
    // Retract facts matching a template and optional filter.
    Retract(ctx context.Context, in *RetractRequest, opts ...grpc.CallOption) (*RetractResponse, error)
    // Stream working-memory changes as they occur during evaluation.
    SubscribeChanges(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FactChange], error)
    // Hot-reload the ruleset from a path or inline YAML.
    Reload(ctx context.Context, in *ReloadRequest, opts ...grpc.CallOption) (*ReloadResponse, error)
}

func NewFathomServiceClient

func NewFathomServiceClient(cc grpc.ClientConnInterface) FathomServiceClient

type FathomServiceServer

FathomServiceServer is the server API for FathomService service. All implementations must embed UnimplementedFathomServiceServer for forward compatibility.

type FathomServiceServer interface {
    // Evaluate asserted facts against loaded rules and return a decision.
    Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error)
    // Assert one or more facts into working memory.
    AssertFact(context.Context, *AssertFactRequest) (*AssertFactResponse, error)
    // Query working memory for facts matching a template and optional filter.
    Query(context.Context, *QueryRequest) (*QueryResponse, error)
    // Retract facts matching a template and optional filter.
    Retract(context.Context, *RetractRequest) (*RetractResponse, error)
    // Stream working-memory changes as they occur during evaluation.
    SubscribeChanges(*SubscribeRequest, grpc.ServerStreamingServer[FactChange]) error
    // Hot-reload the ruleset from a path or inline YAML.
    Reload(context.Context, *ReloadRequest) (*ReloadResponse, error)
    // contains filtered or unexported methods
}

type FathomService\_SubscribeChangesClient

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type FathomService_SubscribeChangesClient = grpc.ServerStreamingClient[FactChange]

type FathomService\_SubscribeChangesServer

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type FathomService_SubscribeChangesServer = grpc.ServerStreamingServer[FactChange]

type QueryRequest

type QueryRequest struct {
    SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
    Template  string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
    // Optional JSON-encoded filter (e.g. {"agent_id": "a1"}).
    FilterJson string `protobuf:"bytes,3,opt,name=filter_json,json=filterJson,proto3" json:"filter_json,omitempty"`
    // contains filtered or unexported fields
}

func (*QueryRequest) Descriptor

func (*QueryRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetFilterJson

func (x *QueryRequest) GetFilterJson() string

func (*QueryRequest) GetSessionId

func (x *QueryRequest) GetSessionId() string

func (*QueryRequest) GetTemplate

func (x *QueryRequest) GetTemplate() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

func (x *QueryRequest) ProtoReflect() protoreflect.Message

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

type QueryResponse

type QueryResponse struct {

    // Each entry is a JSON-encoded dict representing one fact.
    FactsJson []string `protobuf:"bytes,1,rep,name=facts_json,json=factsJson,proto3" json:"facts_json,omitempty"`
    // contains filtered or unexported fields
}

func (*QueryResponse) Descriptor

func (*QueryResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetFactsJson

func (x *QueryResponse) GetFactsJson() []string

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

type ReloadRequest

type ReloadRequest struct {

    // Types that are valid to be assigned to Source:
    //
    //  *ReloadRequest_RulesetPath
    //  *ReloadRequest_RulesetYaml
    Source    isReloadRequest_Source `protobuf_oneof:"source"`
    Signature []byte                 `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
    // contains filtered or unexported fields
}

func (*ReloadRequest) Descriptor

func (*ReloadRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReloadRequest.ProtoReflect.Descriptor instead.

func (*ReloadRequest) GetRulesetPath

func (x *ReloadRequest) GetRulesetPath() string

func (*ReloadRequest) GetRulesetYaml

func (x *ReloadRequest) GetRulesetYaml() string

func (*ReloadRequest) GetSignature

func (x *ReloadRequest) GetSignature() []byte

func (*ReloadRequest) GetSource

func (x *ReloadRequest) GetSource() isReloadRequest_Source

func (*ReloadRequest) ProtoMessage

func (*ReloadRequest) ProtoMessage()

func (*ReloadRequest) ProtoReflect

func (x *ReloadRequest) ProtoReflect() protoreflect.Message

func (*ReloadRequest) Reset

func (x *ReloadRequest) Reset()

func (*ReloadRequest) String

func (x *ReloadRequest) String() string

type ReloadRequest\_RulesetPath

type ReloadRequest_RulesetPath struct {
    RulesetPath string `protobuf:"bytes,1,opt,name=ruleset_path,json=rulesetPath,proto3,oneof"`
}

type ReloadRequest\_RulesetYaml

type ReloadRequest_RulesetYaml struct {
    RulesetYaml string `protobuf:"bytes,2,opt,name=ruleset_yaml,json=rulesetYaml,proto3,oneof"`
}

type ReloadResponse

type ReloadResponse struct {
    RulesetHashBefore string `protobuf:"bytes,1,opt,name=ruleset_hash_before,json=rulesetHashBefore,proto3" json:"ruleset_hash_before,omitempty"`
    RulesetHashAfter  string `protobuf:"bytes,2,opt,name=ruleset_hash_after,json=rulesetHashAfter,proto3" json:"ruleset_hash_after,omitempty"`
    AttestationToken  string `protobuf:"bytes,3,opt,name=attestation_token,json=attestationToken,proto3" json:"attestation_token,omitempty"`
    // contains filtered or unexported fields
}

func (*ReloadResponse) Descriptor

func (*ReloadResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReloadResponse.ProtoReflect.Descriptor instead.

func (*ReloadResponse) GetAttestationToken

func (x *ReloadResponse) GetAttestationToken() string

func (*ReloadResponse) GetRulesetHashAfter

func (x *ReloadResponse) GetRulesetHashAfter() string

func (*ReloadResponse) GetRulesetHashBefore

func (x *ReloadResponse) GetRulesetHashBefore() string

func (*ReloadResponse) ProtoMessage

func (*ReloadResponse) ProtoMessage()

func (*ReloadResponse) ProtoReflect

func (x *ReloadResponse) ProtoReflect() protoreflect.Message

func (*ReloadResponse) Reset

func (x *ReloadResponse) Reset()

func (*ReloadResponse) String

func (x *ReloadResponse) String() string

type RetractRequest

type RetractRequest struct {
    SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
    Template  string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
    // Optional JSON-encoded filter.
    FilterJson string `protobuf:"bytes,3,opt,name=filter_json,json=filterJson,proto3" json:"filter_json,omitempty"`
    // contains filtered or unexported fields
}

func (*RetractRequest) Descriptor

func (*RetractRequest) Descriptor() ([]byte, []int)

Deprecated: Use RetractRequest.ProtoReflect.Descriptor instead.

func (*RetractRequest) GetFilterJson

func (x *RetractRequest) GetFilterJson() string

func (*RetractRequest) GetSessionId

func (x *RetractRequest) GetSessionId() string

func (*RetractRequest) GetTemplate

func (x *RetractRequest) GetTemplate() string

func (*RetractRequest) ProtoMessage

func (*RetractRequest) ProtoMessage()

func (*RetractRequest) ProtoReflect

func (x *RetractRequest) ProtoReflect() protoreflect.Message

func (*RetractRequest) Reset

func (x *RetractRequest) Reset()

func (*RetractRequest) String

func (x *RetractRequest) String() string

type RetractResponse

type RetractResponse struct {
    RetractedCount int32 `protobuf:"varint,1,opt,name=retracted_count,json=retractedCount,proto3" json:"retracted_count,omitempty"`
    // contains filtered or unexported fields
}

func (*RetractResponse) Descriptor

func (*RetractResponse) Descriptor() ([]byte, []int)

Deprecated: Use RetractResponse.ProtoReflect.Descriptor instead.

func (*RetractResponse) GetRetractedCount

func (x *RetractResponse) GetRetractedCount() int32

func (*RetractResponse) ProtoMessage

func (*RetractResponse) ProtoMessage()

func (*RetractResponse) ProtoReflect

func (x *RetractResponse) ProtoReflect() protoreflect.Message

func (*RetractResponse) Reset

func (x *RetractResponse) Reset()

func (*RetractResponse) String

func (x *RetractResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
    SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
    // contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor

func (*SubscribeRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetSessionId

func (x *SubscribeRequest) GetSessionId() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

func (x *SubscribeRequest) ProtoReflect() protoreflect.Message

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type UnimplementedFathomServiceServer

UnimplementedFathomServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

type UnimplementedFathomServiceServer struct{}

func (UnimplementedFathomServiceServer) AssertFact

func (UnimplementedFathomServiceServer) AssertFact(context.Context, *AssertFactRequest) (*AssertFactResponse, error)

func (UnimplementedFathomServiceServer) Evaluate

func (UnimplementedFathomServiceServer) Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error)

func (UnimplementedFathomServiceServer) Query

func (UnimplementedFathomServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)

func (UnimplementedFathomServiceServer) Reload

func (UnimplementedFathomServiceServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error)

func (UnimplementedFathomServiceServer) Retract

func (UnimplementedFathomServiceServer) Retract(context.Context, *RetractRequest) (*RetractResponse, error)

func (UnimplementedFathomServiceServer) SubscribeChanges

func (UnimplementedFathomServiceServer) SubscribeChanges(*SubscribeRequest, grpc.ServerStreamingServer[FactChange]) error

type UnsafeFathomServiceServer

UnsafeFathomServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FathomServiceServer will result in compilation errors.

type UnsafeFathomServiceServer interface {
    // contains filtered or unexported methods
}

Generated by gomarkdoc