-
Notifications
You must be signed in to change notification settings - Fork 41
feat: add projects api #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The scope of this PR is also to refactor Org Service. type OrganizationService interface {
GetOrganization(ctx context.Context, id string) (org.Organization, error)
CreateOrganization(ctx context.Context, org org.Organization) (org.Organization, error)
ListOrganizations(ctx context.Context) ([]org.Organization, error)
UpdateOrganization(ctx context.Context, toUpdate org.Organization) (org.Organization, error)
}To: type OrganizationService interface {
Get(ctx context.Context, id string) (modelv1.Organization, error)
Create(ctx context.Context, org modelv1.Organization) (modelv1.Organization, error)
List(ctx context.Context) ([]modelv1.Organization, error)
Update(ctx context.Context, toUpdate modelv1.Organization) (modelv1.Organization, error)
} |
api/handler/v1/org.go
Outdated
| CreateOrganization(ctx context.Context, org org.Organization) (org.Organization, error) | ||
| ListOrganizations(ctx context.Context) ([]org.Organization, error) | ||
| UpdateOrganization(ctx context.Context, toUpdate org.Organization) (org.Organization, error) | ||
| GetOrganization(ctx context.Context, id string) (modelv1.Organization, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krtkvrm I think we don't need to version internal models. So would suggest removing versioning from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah.. makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
*Organizationversioncolumn in org table