MCPcopy
hub / github.com/cloudreve/cloudreve / Get

Method Get

ent/client.go:914–916  ·  view source on GitHub ↗

Get returns a File entity by its id.

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

912
913// Get returns a File entity by its id.
914func (c *FileClient) Get(ctx context.Context, id int) (*File, error) {
915 return c.Query().Where(file.ID(id)).Only(ctx)
916}
917
918// GetX is like Get, but panics if an error occurs.
919func (c *FileClient) GetX(ctx context.Context, id int) *File {

Callers 1

GetXMethod · 0.95

Calls 4

QueryMethod · 0.95
IDFunction · 0.92
OnlyMethod · 0.45
WhereMethod · 0.45

Tested by

no test coverage detected