Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Define and handle v1/metadata API operations to track, untrack, and get logical models.
Synopsis
- data TrackLogicalModel (b :: BackendType) = TrackLogicalModel {}
- data GetLogicalModel (b :: BackendType) = GetLogicalModel {}
- runGetLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m, MetadataM m) => GetLogicalModel b -> m EncJSON
- execTrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => TrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier)
- data UntrackLogicalModel (b :: BackendType) = UntrackLogicalModel {}
- execUntrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => UntrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier)
- data CreateLogicalModelPermission a (b :: BackendType) = CreateLogicalModelPermission {
- clmpSource :: SourceName
- clmpName :: LogicalModelName
- clmpInfo :: PermDef b a
- runCreateSelectLogicalModelPermission :: forall b m. (Backend b, CacheRWM m, MetadataM m, MonadError QErr m) => CreateLogicalModelPermission SelPerm b -> m EncJSON
- data DropLogicalModelPermission (b :: BackendType) = DropLogicalModelPermission {}
- runDropSelectLogicalModelPermission :: forall b m. (Backend b, CacheRWM m, MetadataM m, MonadError QErr m) => DropLogicalModelPermission b -> m EncJSON
- dropLogicalModelInMetadata :: forall b. BackendMetadata b => SourceName -> LogicalModelName -> MetadataModifier
Documentation
data TrackLogicalModel (b :: BackendType) Source #
Default implementation of the track_logical_model
request payload.
TrackLogicalModel | |
|
Instances
Backend b => FromJSON (TrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API parseJSON :: Value -> Parser (TrackLogicalModel b) Source # parseJSONList :: Value -> Parser [TrackLogicalModel b] Source # | |
Backend b => ToJSON (TrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API toJSON :: TrackLogicalModel b -> Value Source # toEncoding :: TrackLogicalModel b -> Encoding Source # toJSONList :: [TrackLogicalModel b] -> Value Source # toEncodingList :: [TrackLogicalModel b] -> Encoding Source # | |
Backend b => HasCodec (TrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API |
data GetLogicalModel (b :: BackendType) Source #
API payload for the get_logical_model
endpoint.
Instances
Backend b => FromJSON (GetLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API parseJSON :: Value -> Parser (GetLogicalModel b) Source # parseJSONList :: Value -> Parser [GetLogicalModel b] Source # | |
Backend b => ToJSON (GetLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API toJSON :: GetLogicalModel b -> Value Source # toEncoding :: GetLogicalModel b -> Encoding Source # toJSONList :: [GetLogicalModel b] -> Value Source # toEncodingList :: [GetLogicalModel b] -> Encoding Source # | |
Backend b => Show (GetLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API showsPrec :: Int -> GetLogicalModel b -> ShowS # show :: GetLogicalModel b -> String # showList :: [GetLogicalModel b] -> ShowS # | |
Backend b => Eq (GetLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API (==) :: GetLogicalModel b -> GetLogicalModel b -> Bool # (/=) :: GetLogicalModel b -> GetLogicalModel b -> Bool # |
runGetLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m, MetadataM m) => GetLogicalModel b -> m EncJSON Source #
Handler for the get_logical_model
endpoint.
execTrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => TrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier) Source #
Handler for the track_logical_model
endpoint. The type 'TrackLogicalModel b'
(appearing here in wrapped as 'BackendTrackLogicalModel b' for AnyBackend
compatibility) is defined in 'class LogicalModelMetadata'.
data UntrackLogicalModel (b :: BackendType) Source #
API payload for the untrack_logical_model
endpoint.
Instances
FromJSON (UntrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API parseJSON :: Value -> Parser (UntrackLogicalModel b) Source # parseJSONList :: Value -> Parser [UntrackLogicalModel b] Source # | |
ToJSON (UntrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API toJSON :: UntrackLogicalModel b -> Value Source # toEncoding :: UntrackLogicalModel b -> Encoding Source # toJSONList :: [UntrackLogicalModel b] -> Value Source # toEncodingList :: [UntrackLogicalModel b] -> Encoding Source # | |
Show (UntrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API showsPrec :: Int -> UntrackLogicalModel b -> ShowS # show :: UntrackLogicalModel b -> String # showList :: [UntrackLogicalModel b] -> ShowS # | |
Eq (UntrackLogicalModel b) Source # | |
Defined in Hasura.LogicalModel.API (==) :: UntrackLogicalModel b -> UntrackLogicalModel b -> Bool # (/=) :: UntrackLogicalModel b -> UntrackLogicalModel b -> Bool # |
execUntrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => UntrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier) Source #
Handler for the untrack_logical_model
endpoint.
data CreateLogicalModelPermission a (b :: BackendType) Source #
A permission for logical models is tied to a specific name and source. This wrapper adds both of those things to the JSON object that describes the permission.
CreateLogicalModelPermission | |
|
Instances
runCreateSelectLogicalModelPermission :: forall b m. (Backend b, CacheRWM m, MetadataM m, MonadError QErr m) => CreateLogicalModelPermission SelPerm b -> m EncJSON Source #
data DropLogicalModelPermission (b :: BackendType) Source #
To drop a permission, we need to know the source and name of the logical model, as well as the role whose permission we want to drop.
Instances
runDropSelectLogicalModelPermission :: forall b m. (Backend b, CacheRWM m, MetadataM m, MonadError QErr m) => DropLogicalModelPermission b -> m EncJSON Source #
dropLogicalModelInMetadata :: forall b. BackendMetadata b => SourceName -> LogicalModelName -> MetadataModifier Source #
TODO: should this cascade and also delete associated permissions?