Skip to content

Commit

Permalink
first pass on API design and data model for clusters and items
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Oct 10, 2023
1 parent 23b7736 commit 1ee6ab9
Show file tree
Hide file tree
Showing 99 changed files with 22,814 additions and 3,430 deletions.
511 changes: 511 additions & 0 deletions api/openapi.yaml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions app/transports/openapi/bindings/bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ type Bindings struct {
Reacts
Assets
Collections
Clusters
Items
}

// bindingsProviders provides to the application the necessary implementations
Expand All @@ -97,6 +99,8 @@ func bindingsProviders() fx.Option {
NewReacts,
NewAssets,
NewCollections,
NewClusters,
NewItems,
)
}

Expand Down
56 changes: 56 additions & 0 deletions app/transports/openapi/bindings/clusters.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package bindings

import (
"context"

"github.com/Southclaws/storyden/app/resources/collection"
collection_svc "github.com/Southclaws/storyden/app/services/collection"
"github.com/Southclaws/storyden/internal/openapi"
)

type Clusters struct {
collection_repo collection.Repository
collection_svc collection_svc.Service
}

func NewClusters(
collection_repo collection.Repository,
collection_svc collection_svc.Service,
) Clusters {
return Clusters{
collection_repo: collection_repo,
collection_svc: collection_svc,
}
}

func (i *Clusters) ClusterList(ctx context.Context, request openapi.ClusterListRequestObject) (openapi.ClusterListResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterCreate(ctx context.Context, request openapi.ClusterCreateRequestObject) (openapi.ClusterCreateResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterGet(ctx context.Context, request openapi.ClusterGetRequestObject) (openapi.ClusterGetResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterUpdate(ctx context.Context, request openapi.ClusterUpdateRequestObject) (openapi.ClusterUpdateResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterRemoveCluster(ctx context.Context, request openapi.ClusterRemoveClusterRequestObject) (openapi.ClusterRemoveClusterResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterAddCluster(ctx context.Context, request openapi.ClusterAddClusterRequestObject) (openapi.ClusterAddClusterResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterRemoveItem(ctx context.Context, request openapi.ClusterRemoveItemRequestObject) (openapi.ClusterRemoveItemResponseObject, error) {
return nil, nil
}

func (i *Clusters) ClusterAddItem(ctx context.Context, request openapi.ClusterAddItemRequestObject) (openapi.ClusterAddItemResponseObject, error) {
return nil, nil
}
40 changes: 40 additions & 0 deletions app/transports/openapi/bindings/items.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package bindings

import (
"context"

"github.com/Southclaws/storyden/app/resources/collection"
collection_svc "github.com/Southclaws/storyden/app/services/collection"
"github.com/Southclaws/storyden/internal/openapi"
)

type Items struct {
collection_repo collection.Repository
collection_svc collection_svc.Service
}

func NewItems(
collection_repo collection.Repository,
collection_svc collection_svc.Service,
) Items {
return Items{
collection_repo: collection_repo,
collection_svc: collection_svc,
}
}

func (i *Items) ItemList(ctx context.Context, request openapi.ItemListRequestObject) (openapi.ItemListResponseObject, error) {
return nil, nil
}

func (i *Items) ItemCreate(ctx context.Context, request openapi.ItemCreateRequestObject) (openapi.ItemCreateResponseObject, error) {
return nil, nil
}

func (i *Items) ItemGet(ctx context.Context, request openapi.ItemGetRequestObject) (openapi.ItemGetResponseObject, error) {
return nil, nil
}

func (i *Items) ItemUpdate(ctx context.Context, request openapi.ItemUpdateRequestObject) (openapi.ItemUpdateResponseObject, error) {
return nil, nil
}
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ require github.com/Southclaws/fault v0.6.0
require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/Southclaws/opt v0.6.0
github.com/a8m/enter v0.0.0-20230407172335-1834787a98fe
github.com/dboslee/lru v0.0.1
github.com/disintegration/imaging v1.6.2
github.com/gabriel-vasile/mimetype v1.4.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ github.com/Southclaws/fault v0.6.0 h1:DioPOnLB0rXH80eca65BmO6UTaemz0XwN0Lws4G3Kg
github.com/Southclaws/fault v0.6.0/go.mod h1:ykAz97glbxwopwRqAPfQMy8/Y4O+s3c6YtXwaSbxnEg=
github.com/Southclaws/opt v0.6.0 h1:DnsHXMfeW8vV1y2oa26bpx1dn76PERw4QNw25b6U498=
github.com/Southclaws/opt v0.6.0/go.mod h1:zGjXSHmM4ScFX3TLkCr8TdVvd4KAcZq0mwWtzqoqwwQ=
github.com/a8m/enter v0.0.0-20230407172335-1834787a98fe h1:Wx1QNWtwtyIOMCJ+zQ6NkweM+TB+DbNcoz56HibaBtI=
github.com/a8m/enter v0.0.0-20230407172335-1834787a98fe/go.mod h1:oIhrOH1HOtDThKUKzKLbeF979y2PjDTiLPSTe4kmTDE=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
Expand Down
36 changes: 34 additions & 2 deletions internal/ent/account.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions internal/ent/account/account.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions internal/ent/account/where.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions internal/ent/account_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1ee6ab9

Please sign in to comment.