Skip to content

Implemented the APIs based on template #15

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Bibhu20031
Copy link

Changes Made:

  • Implemented template-related APIs (GET, POST, DELETE)

Notes:

  • Storage implementation is still pending.

@halabooda halabooda mentioned this pull request Feb 14, 2025
10 tasks
@halabooda
Copy link
Member

Awesome work!

KillAll()
KillContainer(StartedContainer) error
}

type Storage interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this and other API code to separate file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By other API code, do you mean moving the handlers to a separate file too, or just the logic related functions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean move code with API and storage from manager which control Docker images, networks and containers

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll move the API handlers and storage logic into separate files

@@ -129,7 +144,29 @@ func (m *CodenireOrchestrator) Boot() (err error) {
}

func (m *CodenireOrchestrator) GetTemplates() []BuiltImage {
return m.imgs
templates, err := m.storage.LoadTemplates()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currentrly, GetTemplates() need for work Playground and should be connect to running images. So we can do it lately, when all logic with storage wiil be done

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense. We'll update it once the storage logic is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants