Documentation
¶
Overview ¶
Package ipfs provides methods and message types of the ipfs v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) CreatePinByCID(req *CreatePinByCIDRequest, opts ...scw.RequestOption) (*Pin, error)
- func (s *API) CreatePinByRaw(req *CreatePinByRawRequest, opts ...scw.RequestOption) (*Pin, error)
- func (s *API) CreatePinByURL(req *CreatePinByURLRequest, opts ...scw.RequestOption) (*Pin, error)
- func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *API) DeletePin(req *DeletePinRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error
- func (s *API) GetPin(req *GetPinRequest, opts ...scw.RequestOption) (*Pin, error)
- func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *API) ListPins(req *ListPinsRequest, opts ...scw.RequestOption) (*ListPinsResponse, error)
- func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
- func (s *API) Regions() []scw.Region
- func (s *API) ReplacePin(req *ReplacePinRequest, opts ...scw.RequestOption) (*ReplacePinResponse, error)
- func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- type CreatePinByCIDRequest
- type CreatePinByRawRequest
- type CreatePinByURLRequest
- type CreateVolumeRequest
- type DeletePinRequest
- type DeleteVolumeRequest
- type GetPinRequest
- type GetVolumeRequest
- type ListPinsRequest
- type ListPinsRequestOrderBy
- type ListPinsResponse
- type ListVolumesRequest
- type ListVolumesRequestOrderBy
- type ListVolumesResponse
- type Pin
- type PinCID
- type PinCIDMeta
- type PinInfo
- type PinOptions
- type PinStatus
- type ReplacePinRequest
- type ReplacePinResponse
- type UpdateVolumeRequest
- type Volume
Constants ¶
const ( ListPinsRequestOrderByCreatedAtAsc = ListPinsRequestOrderBy("created_at_asc") ListPinsRequestOrderByCreatedAtDesc = ListPinsRequestOrderBy("created_at_desc") )
const ( ListVolumesRequestOrderByCreatedAtAsc = ListVolumesRequestOrderBy("created_at_asc") ListVolumesRequestOrderByCreatedAtDesc = ListVolumesRequestOrderBy("created_at_desc") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: pinning service ipfs API for Scaleway. Ipfs pinning service v1alpha1.
func (*API) CreatePinByCID ¶
func (s *API) CreatePinByCID(req *CreatePinByCIDRequest, opts ...scw.RequestOption) (*Pin, error)
CreatePinByCID: add content in s3 bucket.
func (*API) CreatePinByRaw ¶
func (s *API) CreatePinByRaw(req *CreatePinByRawRequest, opts ...scw.RequestOption) (*Pin, error)
CreatePinByRaw: add content in s3 bucket.
func (*API) CreatePinByURL ¶
func (s *API) CreatePinByURL(req *CreatePinByURLRequest, opts ...scw.RequestOption) (*Pin, error)
CreatePinByURL: add content in s3 bucket.
func (*API) CreateVolume ¶
func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
CreateVolume: create volume in S3 bucket.
func (*API) DeletePin ¶
func (s *API) DeletePin(req *DeletePinRequest, opts ...scw.RequestOption) error
DeletePin: remove by pin id.
func (*API) DeleteVolume ¶
func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error
DeleteVolume: delete volume in S3 bucket.
func (*API) GetPin ¶
func (s *API) GetPin(req *GetPinRequest, opts ...scw.RequestOption) (*Pin, error)
GetPin: get pin id create when content is add in s3 bucket.
func (*API) GetVolume ¶
func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
GetVolume: get information about volume.
func (*API) ListPins ¶
func (s *API) ListPins(req *ListPinsRequest, opts ...scw.RequestOption) (*ListPinsResponse, error)
func (*API) ListVolumes ¶
func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
ListVolumes: list volumes in project-id.
func (*API) ReplacePin ¶
func (s *API) ReplacePin(req *ReplacePinRequest, opts ...scw.RequestOption) (*ReplacePinResponse, error)
func (*API) UpdateVolume ¶
func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
UpdateVolume: update volume name or tag.
type CreatePinByCIDRequest ¶
type CreatePinByCIDRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` VolumeID string `json:"volume_id"` Cid string `json:"cid"` Name *string `json:"name"` Origins []string `json:"origins"` Meta *PinCIDMeta `json:"meta"` PinOptions *PinOptions `json:"pin_options"` }
type CreatePinByRawRequest ¶
type CreatePinByRawRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` VolumeID string `json:"volume_id"` Content []byte `json:"content"` MimeType *string `json:"mime_type"` Name *string `json:"name"` PinOptions *PinOptions `json:"pin_options"` }
type CreatePinByURLRequest ¶
type CreateVolumeRequest ¶
type DeletePinRequest ¶
type DeleteVolumeRequest ¶
type GetPinRequest ¶
type GetVolumeRequest ¶
type ListPinsRequest ¶
type ListPinsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` VolumeID string `json:"-"` ProjectID *string `json:"-"` OrganizationID *string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // OrderBy: default value: created_at_asc OrderBy ListPinsRequestOrderBy `json:"-"` // Status: default value: unknown_status Status PinStatus `json:"-"` }
type ListPinsRequestOrderBy ¶
type ListPinsRequestOrderBy string
func (ListPinsRequestOrderBy) MarshalJSON ¶
func (enum ListPinsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPinsRequestOrderBy) String ¶
func (enum ListPinsRequestOrderBy) String() string
func (*ListPinsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPinsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListPinsResponse ¶
func (*ListPinsResponse) UnsafeAppend ¶
func (r *ListPinsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListPinsResponse) UnsafeGetTotalCount ¶
func (r *ListPinsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListVolumesRequest ¶
type ListVolumesRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` ProjectID string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // OrderBy: default value: created_at_asc OrderBy ListVolumesRequestOrderBy `json:"-"` }
type ListVolumesRequestOrderBy ¶
type ListVolumesRequestOrderBy string
func (ListVolumesRequestOrderBy) MarshalJSON ¶
func (enum ListVolumesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListVolumesRequestOrderBy) String ¶
func (enum ListVolumesRequestOrderBy) String() string
func (*ListVolumesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListVolumesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListVolumesResponse ¶
type ListVolumesResponse struct { Volumes []*Volume `json:"volumes"` TotalCount uint64 `json:"total_count"` }
func (*ListVolumesResponse) UnsafeAppend ¶
func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListVolumesResponse) UnsafeGetTotalCount ¶
func (r *ListVolumesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type PinCID ¶
type PinCID struct { Cid string `json:"cid"` Name *string `json:"name"` Origins []string `json:"origins"` Meta *PinCIDMeta `json:"meta"` }
type PinCIDMeta ¶
type PinCIDMeta struct {
AppID string `json:"app_id"`
}
type PinOptions ¶
type PinStatus ¶
type PinStatus string
func (PinStatus) MarshalJSON ¶
func (*PinStatus) UnmarshalJSON ¶
type ReplacePinRequest ¶
type ReplacePinRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` PinID string `json:"-"` VolumeID string `json:"volume_id"` Cid string `json:"cid"` Name *string `json:"name"` Origins []string `json:"origins"` Meta *PinCIDMeta `json:"meta"` PinOptions *PinOptions `json:"pin_options"` }
type ReplacePinResponse ¶
type ReplacePinResponse struct {
Pin *Pin `json:"pin"`
}