Documentation ¶
Index ¶
- Constants
- Variables
- type Attachment
- type AttachmentCollectionFileRequestConfiguration
- type AttachmentCollectionGetRequestConfiguration
- type AttachmentCollectionResponse
- type AttachmentItemResponse
- type AttachmentRequestBuilder
- type AttachmentRequestBuilderFileQueryParameters
- type AttachmentRequestBuilderGetQueryParameters
- type Bool
- type Int
- type Time
Constants ¶
View Source
const ( DateFormat = "2006-01-02" TimeFormat = "15:04:05" DateTimeFormat = DateFormat + " " + TimeFormat )
Variables ¶
View Source
var (
ErrNilParams = errors.New("params cannot be nil")
)
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { TableSysId string `json:"table_sys_id"` //nolint:stylecheck Size Int `json:"size_bytes"` DownloadLink string `json:"download_link"` UpdatedOn Time `json:"sys_updated_on"` SysId string `json:"sys_id"` //nolint:stylecheck ImageHeight Int `json:"image_height"` SysCreatedOn Time `json:"sys_created_on"` FileName string `json:"file_name"` SysCreatedBy string `json:"sys_created_by"` Compressed Bool `json:"compressed"` AverageImageColor string `json:"average_image_color"` SysUpdatedBy string `json:"sys_updated_by"` SysTags string `json:"sys_tags"` TableName string `json:"table_name"` ImageWidth Int `json:"image_width"` SysModCount Int `json:"sys_mod_count"` ContentType string `json:"content_type"` SizeCompressed Int `json:"size_compressed"` }
type AttachmentCollectionFileRequestConfiguration ¶ added in v1.4.0
type AttachmentCollectionFileRequestConfiguration struct { Header interface{} QueryParameters *AttachmentRequestBuilderFileQueryParameters Data interface{} ErrorMapping core.ErrorMapping // contains filtered or unexported fields }
type AttachmentCollectionGetRequestConfiguration ¶ added in v1.4.0
type AttachmentCollectionGetRequestConfiguration struct { Header interface{} QueryParameters *AttachmentRequestBuilderGetQueryParameters Data interface{} ErrorMapping core.ErrorMapping // contains filtered or unexported fields }
type AttachmentCollectionResponse ¶
type AttachmentCollectionResponse struct {
Result []*Attachment
}
func (*AttachmentCollectionResponse) ParseHeaders ¶
func (cR *AttachmentCollectionResponse) ParseHeaders(headers http.Header)
type AttachmentItemResponse ¶ added in v1.2.1
type AttachmentItemResponse struct {
Result *Attachment
}
func (*AttachmentItemResponse) ParseHeaders ¶ added in v1.2.1
func (cR *AttachmentItemResponse) ParseHeaders(headers http.Header)
type AttachmentRequestBuilder ¶
type AttachmentRequestBuilder struct {
core.RequestBuilder
}
func NewAttachmentRequestBuilder ¶
func NewAttachmentRequestBuilder(client core.Client, pathParameters map[string]string) *AttachmentRequestBuilder
func (*AttachmentRequestBuilder) File ¶ added in v1.2.1
func (rB *AttachmentRequestBuilder) File(filePath string, params *AttachmentRequestBuilderFileQueryParameters) (*AttachmentItemResponse, error)
File ...
func (*AttachmentRequestBuilder) Get ¶
func (rB *AttachmentRequestBuilder) Get(params *AttachmentRequestBuilderGetQueryParameters) (*AttachmentCollectionResponse, error)
Get sends an HTTP GET request using the specified query parameters and returns a AttachmentCollectionResponse.
Parameters:
- params: An instance of AttachmentRequestBuilderGetQueryParameters to include in the GET request.
Returns:
- *AttachmentCollectionResponse: The response data as a AttachmentCollectionResponse.
- error: An error if there was an issue with the request or response.
type AttachmentRequestBuilderFileQueryParameters ¶ added in v1.2.1
type AttachmentRequestBuilderFileQueryParameters struct { //EncryptionContext Sys_id of an encryption context record. //Specify this parameter to allow only users with the specified encryption context to access the attachment. //For additional information on encryption context records, // see [Encryption Support]:https://docs.servicenow.com/csh?topicname=c_EncryptionSupport&version=vancouver&pubname=vancouver-platform-security. EncryptionContext string `url:"encryption_context"` //FileName Name to give the attachment. FileName string `url:"file_name"` //TableName Name of the table to attach the file to. TableName string `url:"table_name"` //TableSysId Sys_id of the record in the table specified in table_name that you want to attach the file to. TableSysId string `url:"table_sys_id"` //nolint:stylecheck }
type AttachmentRequestBuilderGetQueryParameters ¶
type AttachmentRequestBuilderGetQueryParameters struct { // Limit Limit to be applied on pagination. Limit int `url:"sysparm_limit"` // Offset Number of records to exclude from the query. Use this parameter to get more records than specified in sysparm_limit. For example, if sysparm_limit is set to 500, but there are additional records you want to query, you can specify a sysparm_offset value of 500 to get the second set of records. Offset int `url:"sysparm_offset"` // Query Encoded query. Queries for the Attachment API are relative to the Attachments [sys_attachment] table. Query string `url:"sysparm_query"` }
Source Files ¶
- attachment.go
- attachment_collection_file_request_configuration.go
- attachment_collection_get_request_configuration.go
- attachment_collection_response.go
- attachment_item_response.go
- attachment_request_builder.go
- attachment_request_builder_file_query_parameters.go
- attachment_request_builder_get_query_parameters.go
- bool.go
- errors.go
- helper.go
- int.go
- time.go
Click to show internal directories.
Click to hide internal directories.