internal/api/artifacts.go
internal/api · 116 lines · 10 declarations · source
Declarations
type artifactIDRequest
type artifactIDRequest struct {
ID string `json:"id"`
// DataSubjectID, when given, requires the object to belong to that person. An application
// serving many people through one credential has no other way to say "this one is theirs": the
// credential opens the project, so without this the application's own care is the only thing
// between one user's session and another's, and care is not a boundary.
DataSubjectID string `json:"data_subject_id,omitempty"`
}
type artifactDeleteRequest
type artifactDeleteRequest struct {
ID string `json:"id"`
ExpectedVersion string `json:"expected_version"`
// DataSubjectID, when given, requires the object to belong to that person, for the same reason
// it does on a read: deleting somebody else's session is the same mistake, spent.
DataSubjectID string `json:"data_subject_id,omitempty"`
}
type artifactListRequest
type artifactListRequest struct {
Kind string `json:"kind,omitempty"`
NamePrefix string `json:"name_prefix,omitempty"`
DataSubjectID string `json:"data_subject_id,omitempty"`
After string `json:"after,omitempty"`
Limit int `json:"limit,omitempty"`
}
type artifactDeleted
type artifactDeleted struct {
Deleted bool `json:"deleted"`
}
method Server.artifactReady
func (s *Server) artifactReady(w http.ResponseWriter) bool
method Server.artifactError
func (s *Server) artifactError(w http.ResponseWriter, r *http.Request, grant credential.Grant, operation string, err error)
method Server.putArtifact
func (s *Server) putArtifact(w http.ResponseWriter, r *http.Request, grant credential.Grant)
method Server.getArtifact
func (s *Server) getArtifact(w http.ResponseWriter, r *http.Request, grant credential.Grant)
method Server.listArtifacts
func (s *Server) listArtifacts(w http.ResponseWriter, r *http.Request, grant credential.Grant)
method Server.deleteArtifact
func (s *Server) deleteArtifact(w http.ResponseWriter, r *http.Request, grant credential.Grant)