Skip to content

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!

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


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