Created
April 20, 2023 01:32
-
-
Save thrawn01/4ead86f5ed2c51d02da687bbc497a209 to your computer and use it in GitHub Desktop.
The code I gave ChatGPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Job struct { | |
Id int | |
FileName string | |
FSType string | |
Status string | |
} | |
type Store1 interface { | |
GetBatchID() int | |
} | |
type Store2 interface { | |
CreateBatchJob(Job) error | |
} | |
type Service struct { | |
s1 Store1 | |
s2 Store2 | |
} | |
type FileSystem interface { | |
ReadFile(name string) (io.ReadCloser, error) | |
WriteFile(name string) (io.WriteCloser, error) | |
FSType() string | |
} | |
func (s *Service) UploadAndEnqueueJob(appID int, src io.ReadCloser, dest FileSystem) error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment