Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Dependencies
- type GRPCServerConfig
- type HTTPServerConfig
- type Server
- func (s *Server) Check(ctx context.Context, req *openfgapb.CheckRequest) (*openfgapb.CheckResponse, error)
- func (s *Server) CreateStore(ctx context.Context, req *openfgapb.CreateStoreRequest) (*openfgapb.CreateStoreResponse, error)
- func (s *Server) DeleteStore(ctx context.Context, req *openfgapb.DeleteStoreRequest) (*openfgapb.DeleteStoreResponse, error)
- func (s *Server) Expand(ctx context.Context, req *openfgapb.ExpandRequest) (*openfgapb.ExpandResponse, error)
- func (s *Server) GetStore(ctx context.Context, req *openfgapb.GetStoreRequest) (*openfgapb.GetStoreResponse, error)
- func (s *Server) ListStores(ctx context.Context, req *openfgapb.ListStoresRequest) (*openfgapb.ListStoresResponse, error)
- func (s *Server) Read(ctx context.Context, req *openfgapb.ReadRequest) (*openfgapb.ReadResponse, error)
- func (s *Server) ReadAssertions(ctx context.Context, req *openfgapb.ReadAssertionsRequest) (*openfgapb.ReadAssertionsResponse, error)
- func (s *Server) ReadAuthorizationModel(ctx context.Context, req *openfgapb.ReadAuthorizationModelRequest) (*openfgapb.ReadAuthorizationModelResponse, error)
- func (s *Server) ReadAuthorizationModels(ctx context.Context, req *openfgapb.ReadAuthorizationModelsRequest) (*openfgapb.ReadAuthorizationModelsResponse, error)
- func (s *Server) ReadChanges(ctx context.Context, req *openfgapb.ReadChangesRequest) (*openfgapb.ReadChangesResponse, error)
- func (s *Server) ReadTuples(ctx context.Context, req *openfgapb.ReadTuplesRequest) (*openfgapb.ReadTuplesResponse, error)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) Write(ctx context.Context, req *openfgapb.WriteRequest) (*openfgapb.WriteResponse, error)
- func (s *Server) WriteAssertions(ctx context.Context, req *openfgapb.WriteAssertionsRequest) (*openfgapb.WriteAssertionsResponse, error)
- func (s *Server) WriteAuthorizationModel(ctx context.Context, req *openfgapb.WriteAuthorizationModelRequest) (*openfgapb.WriteAuthorizationModelResponse, error)
- type TLSConfig
Constants ¶
View Source
const (
AuthorizationModelIDHeader = "openfga-authorization-model-id"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServiceName string GRPCServer GRPCServerConfig HTTPServer HTTPServerConfig ResolveNodeLimit uint32 ChangelogHorizonOffset int UnaryInterceptors []grpc.UnaryServerInterceptor MuxOptions []runtime.ServeMuxOption RequestTimeout time.Duration }
type Dependencies ¶
type Dependencies struct { Datastore storage.OpenFGADatastore Tracer trace.Tracer Meter metric.Meter Logger logger.Logger // TokenEncoder is the encoder used to encode continuation tokens for paginated views. // Defaults to Base64Encoder if none is provided. TokenEncoder encoder.Encoder Transport gateway.Transport }
type GRPCServerConfig ¶ added in v0.1.1
type HTTPServerConfig ¶ added in v0.1.1
type Server ¶
type Server struct { openfgapb.UnimplementedOpenFGAServiceServer // contains filtered or unexported fields }
A Server implements the OpenFGA service backend as both a GRPC and HTTP server.
func New ¶
func New(dependencies *Dependencies, config *Config) (*Server, error)
New creates a new Server which uses the supplied backends for managing data.
func (*Server) Check ¶
func (s *Server) Check(ctx context.Context, req *openfgapb.CheckRequest) (*openfgapb.CheckResponse, error)
func (*Server) CreateStore ¶
func (s *Server) CreateStore(ctx context.Context, req *openfgapb.CreateStoreRequest) (*openfgapb.CreateStoreResponse, error)
func (*Server) DeleteStore ¶
func (s *Server) DeleteStore(ctx context.Context, req *openfgapb.DeleteStoreRequest) (*openfgapb.DeleteStoreResponse, error)
func (*Server) Expand ¶
func (s *Server) Expand(ctx context.Context, req *openfgapb.ExpandRequest) (*openfgapb.ExpandResponse, error)
func (*Server) GetStore ¶
func (s *Server) GetStore(ctx context.Context, req *openfgapb.GetStoreRequest) (*openfgapb.GetStoreResponse, error)
func (*Server) ListStores ¶
func (s *Server) ListStores(ctx context.Context, req *openfgapb.ListStoresRequest) (*openfgapb.ListStoresResponse, error)
func (*Server) Read ¶
func (s *Server) Read(ctx context.Context, req *openfgapb.ReadRequest) (*openfgapb.ReadResponse, error)
func (*Server) ReadAssertions ¶
func (s *Server) ReadAssertions(ctx context.Context, req *openfgapb.ReadAssertionsRequest) (*openfgapb.ReadAssertionsResponse, error)
func (*Server) ReadAuthorizationModel ¶
func (s *Server) ReadAuthorizationModel(ctx context.Context, req *openfgapb.ReadAuthorizationModelRequest) (*openfgapb.ReadAuthorizationModelResponse, error)
func (*Server) ReadAuthorizationModels ¶
func (s *Server) ReadAuthorizationModels(ctx context.Context, req *openfgapb.ReadAuthorizationModelsRequest) (*openfgapb.ReadAuthorizationModelsResponse, error)
func (*Server) ReadChanges ¶
func (s *Server) ReadChanges(ctx context.Context, req *openfgapb.ReadChangesRequest) (*openfgapb.ReadChangesResponse, error)
func (*Server) ReadTuples ¶
func (s *Server) ReadTuples(ctx context.Context, req *openfgapb.ReadTuplesRequest) (*openfgapb.ReadTuplesResponse, error)
func (*Server) Run ¶
Run starts server execution, and blocks until complete, returning any server errors. To close the server cancel the provided ctx.
func (*Server) Write ¶
func (s *Server) Write(ctx context.Context, req *openfgapb.WriteRequest) (*openfgapb.WriteResponse, error)
func (*Server) WriteAssertions ¶
func (s *Server) WriteAssertions(ctx context.Context, req *openfgapb.WriteAssertionsRequest) (*openfgapb.WriteAssertionsResponse, error)
func (*Server) WriteAuthorizationModel ¶
func (s *Server) WriteAuthorizationModel(ctx context.Context, req *openfgapb.WriteAuthorizationModelRequest) (*openfgapb.WriteAuthorizationModelResponse, error)
Click to show internal directories.
Click to hide internal directories.