Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [_Unreleased_](https://github.com/freckle/cloudevents-haskell/compare/v0.1.0.0...main)
## [_Unreleased_](https://github.com/freckle/cloudevents-haskell/compare/v0.2.0.0...main)

## [v0.2.0.0](https://github.com/freckle/cloudevents-haskell/tree/v0.2.0.0)

- Update package structure

## [v0.1.0.0](https://github.com/freckle/cloudevents-haskell/tree/v0.1.0.0)

Expand Down
16 changes: 8 additions & 8 deletions cloudevents-haskell.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.2
-- see: https://github.com/sol/hpack

name: cloudevents-haskell
version: 0.1.0.0
version: 0.2.0.0
synopsis: Unofficial Haskell SDK for the CloudEvents specification
description: See the README on GitHub at <https://github.com/freckle/cloudevents-haskell#readme>
category: Utils
Expand All @@ -27,18 +27,18 @@ source-repository head

library
exposed-modules:
CloudEvent.V1.Bindings.Kafka
CloudEvent.V1.Event.Data
CloudEvent.V1.Event.Internal.Data
CloudEvent.V1.Event.Internal.Orphans
CloudEvent.V1.Event.Lens
CloudEvent.V1.Event.Validation
Freckle.CloudEvent.V1.Bindings.Kafka
Freckle.CloudEvent.V1.Event.Data
Freckle.CloudEvent.V1.Event.Internal.Data
Freckle.CloudEvent.V1.Event.Internal.Orphans
Freckle.CloudEvent.V1.Event.Lens
Freckle.CloudEvent.V1.Event.Validation
other-modules:
Paths_cloudevents_haskell
autogen-modules:
Paths_cloudevents_haskell
hs-source-dirs:
src
library
default-extensions:
ApplicativeDo
DataKinds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- single message value using the JSON event format.
--
-- See: <https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/kafka-protocol-binding.md>
module CloudEvent.V1.Bindings.Kafka
module Freckle.CloudEvent.V1.Bindings.Kafka
( KafkaCloudEventExtAttributes (..)
, toBinaryKafkaMessage
, toStructuredKafkaMessage
Expand All @@ -27,7 +27,6 @@ import Autodocodec
, requiredField'
, (.=)
)
import CloudEvent.V1.Event.Internal.Data (CloudEvent (..))
import Data.Aeson (FromJSON, ToJSON, encode)
import Data.Binary (Binary)
import Data.ByteString (ByteString)
Expand All @@ -36,6 +35,7 @@ import Data.Maybe (catMaybes)
import Data.String (IsString (..))
import Data.Text (Text)
import Data.Text.Encoding (encodeUtf8)
import Freckle.CloudEvent.V1.Event.Internal.Data (CloudEvent (..))
import GHC.Generics (Generic)
import GHC.Records (HasField)
import Iri.Rendering.Text (iri)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module CloudEvent.V1.Event.Data
module Freckle.CloudEvent.V1.Event.Data
( CloudEvent
, MkCloudEventArg (..)
, mkCloudEvent
Expand All @@ -13,11 +13,11 @@ import Autodocodec
, HasObjectCodec (objectCodec)
, object
)
import CloudEvent.V1.Event.Internal.Data (CloudEvent (..))
import Data.Aeson (FromJSON, ToJSON)
import Data.Binary (Binary)
import Data.Text (Text)
import Data.Time (UTCTime)
import Freckle.CloudEvent.V1.Event.Internal.Data (CloudEvent (..))
import GHC.Generics (Generic)
import Iri.Data (Iri)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module CloudEvent.V1.Event.Internal.Data
module Freckle.CloudEvent.V1.Event.Internal.Data
( CloudEvent (..)
) where

Expand All @@ -13,11 +13,11 @@ import Autodocodec
, requiredField'
, (.=)
)
import CloudEvent.V1.Event.Internal.Orphans ()
import Data.Aeson (FromJSON, ToJSON)
import Data.Binary (Binary)
import Data.Text (Text)
import Data.Time (UTCTime)
import Freckle.CloudEvent.V1.Event.Internal.Orphans ()
import GHC.Generics (Generic)
import Iri.Data (Iri)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module CloudEvent.V1.Event.Internal.Orphans where
module Freckle.CloudEvent.V1.Event.Internal.Orphans where

import Prelude

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-missing-export-lists #-}

module CloudEvent.V1.Event.Lens where
module Freckle.CloudEvent.V1.Event.Lens where

import CloudEvent.V1.Event.Data (CloudEvent)
import Control.Lens (makeLensesFor)
import Freckle.CloudEvent.V1.Event.Internal.Data (CloudEvent)

makeLensesFor
[ ("ceId", "_ceId")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{-# LANGUAGE AllowAmbiguousTypes #-}

module CloudEvent.V1.Event.Validation
module Freckle.CloudEvent.V1.Event.Validation
( isValidCloudEvent
) where

import Prelude

import Autodocodec (HasCodec, HasObjectCodec)
import Autodocodec.Schema (jsonSchemaViaCodec, validateAccordingTo)
import CloudEvent.V1.Event.Data (CloudEvent)
import Data.Aeson (Value)
import Data.Kind (Type)
import Freckle.CloudEvent.V1.Event.Data (CloudEvent)

-- | Validates that a JSON value conforms to a specific CloudEvents specification.
-- Requires the event data type and extension attributes to be specified as type applications with the event data type first.
Expand Down
4 changes: 2 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cloudevents-haskell
version: 0.1.0.0
version: 0.2.0.0
maintainer: Freckle Education
category: Utils
github: freckle/cloudevents-haskell
Expand Down Expand Up @@ -65,7 +65,7 @@ default-extensions:
- TypeFamilies

library:
source-dirs: src
source-dirs: library
dependencies:
- aeson
- autodocodec
Expand Down