How to use list method of asset Package

Best Syzkaller code snippet using asset.list

asset_service.pb.go

Source:asset_service.pb.go Github

copy

Full Screen

...106 // the current time will be used. Due to delays in resource data collection107 // and indexing, there is a volatile window during which running the same108 // query may get different results.109 ReadTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`110 // A list of asset types of which to take a snapshot for. For example:111 // "compute.googleapis.com/Disk". If specified, only matching assets will be112 // returned. See [Introduction to Cloud Asset113 // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)114 // for all supported asset types.115 AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`116 // Asset content type. If not specified, no content but the asset name will117 // be returned.118 ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1p5beta1.ContentType" json:"content_type,omitempty"`119 // The maximum number of assets to be returned in a single response. Default120 // is 100, minimum is 1, and maximum is 1000.121 PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`122 // The `next_page_token` returned from the previous `ListAssetsResponse`, or123 // unspecified for the first `ListAssetsRequest`. It is a continuation of a124 // prior `ListAssets` call, and the API should return the next page of assets.125 PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`126}127func (x *ListAssetsRequest) Reset() {128 *x = ListAssetsRequest{}129 if protoimpl.UnsafeEnabled {130 mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0]131 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))132 ms.StoreMessageInfo(mi)133 }134}135func (x *ListAssetsRequest) String() string {136 return protoimpl.X.MessageStringOf(x)137}138func (*ListAssetsRequest) ProtoMessage() {}139func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message {140 mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0]141 if protoimpl.UnsafeEnabled && x != nil {142 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))143 if ms.LoadMessageInfo() == nil {144 ms.StoreMessageInfo(mi)145 }146 return ms147 }148 return mi.MessageOf(x)149}150// Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead.151func (*ListAssetsRequest) Descriptor() ([]byte, []int) {152 return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP(), []int{0}153}154func (x *ListAssetsRequest) GetParent() string {155 if x != nil {156 return x.Parent157 }158 return ""159}160func (x *ListAssetsRequest) GetReadTime() *timestamppb.Timestamp {161 if x != nil {162 return x.ReadTime163 }164 return nil165}166func (x *ListAssetsRequest) GetAssetTypes() []string {167 if x != nil {168 return x.AssetTypes169 }170 return nil171}172func (x *ListAssetsRequest) GetContentType() ContentType {173 if x != nil {174 return x.ContentType175 }176 return ContentType_CONTENT_TYPE_UNSPECIFIED177}178func (x *ListAssetsRequest) GetPageSize() int32 {179 if x != nil {180 return x.PageSize181 }182 return 0183}184func (x *ListAssetsRequest) GetPageToken() string {185 if x != nil {186 return x.PageToken187 }188 return ""189}190// ListAssets response.191type ListAssetsResponse struct {192 state protoimpl.MessageState193 sizeCache protoimpl.SizeCache194 unknownFields protoimpl.UnknownFields195 // Time the snapshot was taken.196 ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`197 // Assets.198 Assets []*Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"`199 // Token to retrieve the next page of results. Set to empty if there are no200 // remaining results.201 NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`202}203func (x *ListAssetsResponse) Reset() {204 *x = ListAssetsResponse{}205 if protoimpl.UnsafeEnabled {206 mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1]207 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))208 ms.StoreMessageInfo(mi)209 }210}211func (x *ListAssetsResponse) String() string {212 return protoimpl.X.MessageStringOf(x)213}214func (*ListAssetsResponse) ProtoMessage() {}215func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message {216 mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1]217 if protoimpl.UnsafeEnabled && x != nil {218 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))219 if ms.LoadMessageInfo() == nil {220 ms.StoreMessageInfo(mi)221 }222 return ms223 }224 return mi.MessageOf(x)225}226// Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead.227func (*ListAssetsResponse) Descriptor() ([]byte, []int) {228 return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP(), []int{1}229}230func (x *ListAssetsResponse) GetReadTime() *timestamppb.Timestamp {231 if x != nil {232 return x.ReadTime233 }234 return nil235}236func (x *ListAssetsResponse) GetAssets() []*Asset {237 if x != nil {238 return x.Assets239 }240 return nil241}242func (x *ListAssetsResponse) GetNextPageToken() string {243 if x != nil {244 return x.NextPageToken245 }246 return ""247}248var File_google_cloud_asset_v1p5beta1_asset_service_proto protoreflect.FileDescriptor249var file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc = []byte{250 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61,251 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61,252 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,253 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,254 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31,255 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,256 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,257 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e,258 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,259 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69,260 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,261 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70,262 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72,263 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,264 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,265 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73,266 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61,267 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,268 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f,269 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,270 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,271 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65,272 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18,273 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65,274 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70,275 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,276 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70,277 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,278 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,279 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01,280 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,281 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,282 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x12,283 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,284 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,285 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,286 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,287 0x70, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x61,288 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f,289 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74,290 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74,291 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,292 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,293 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,294 0x2a, 0x6c, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,295 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,296 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,297 0x08, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49,298 0x41, 0x4d, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f,299 0x52, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x41,300 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x05, 0x32, 0xf7,301 0x01, 0x0a, 0x0c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,302 0x97, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2f,303 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73,304 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69,305 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,306 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61,307 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c,308 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,309 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x70, 0x35,310 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x2a, 0x2f,311 0x2a, 0x7d, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x63, 0x6c,312 0x6f, 0x75, 0x64, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,313 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,314 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,315 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d,316 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xb8, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d,317 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73,318 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x41,319 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,320 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,321 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,322 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f,323 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b,324 0x61, 0x73, 0x73, 0x65, 0x74, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43,325 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, 0x50, 0x35, 0x42,326 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c,327 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x70, 0x35, 0x62, 0x65,328 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,329}330var (331 file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescOnce sync.Once332 file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData = file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc333)334func file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP() []byte {335 file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescOnce.Do(func() {336 file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData)337 })338 return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData339}340var file_google_cloud_asset_v1p5beta1_asset_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)341var file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)342var file_google_cloud_asset_v1p5beta1_asset_service_proto_goTypes = []interface{}{343 (ContentType)(0), // 0: google.cloud.asset.v1p5beta1.ContentType344 (*ListAssetsRequest)(nil), // 1: google.cloud.asset.v1p5beta1.ListAssetsRequest345 (*ListAssetsResponse)(nil), // 2: google.cloud.asset.v1p5beta1.ListAssetsResponse346 (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp347 (*Asset)(nil), // 4: google.cloud.asset.v1p5beta1.Asset348}349var file_google_cloud_asset_v1p5beta1_asset_service_proto_depIdxs = []int32{350 3, // 0: google.cloud.asset.v1p5beta1.ListAssetsRequest.read_time:type_name -> google.protobuf.Timestamp351 0, // 1: google.cloud.asset.v1p5beta1.ListAssetsRequest.content_type:type_name -> google.cloud.asset.v1p5beta1.ContentType352 3, // 2: google.cloud.asset.v1p5beta1.ListAssetsResponse.read_time:type_name -> google.protobuf.Timestamp353 4, // 3: google.cloud.asset.v1p5beta1.ListAssetsResponse.assets:type_name -> google.cloud.asset.v1p5beta1.Asset354 1, // 4: google.cloud.asset.v1p5beta1.AssetService.ListAssets:input_type -> google.cloud.asset.v1p5beta1.ListAssetsRequest355 2, // 5: google.cloud.asset.v1p5beta1.AssetService.ListAssets:output_type -> google.cloud.asset.v1p5beta1.ListAssetsResponse356 5, // [5:6] is the sub-list for method output_type357 4, // [4:5] is the sub-list for method input_type358 4, // [4:4] is the sub-list for extension type_name359 4, // [4:4] is the sub-list for extension extendee360 0, // [0:4] is the sub-list for field type_name361}362func init() { file_google_cloud_asset_v1p5beta1_asset_service_proto_init() }363func file_google_cloud_asset_v1p5beta1_asset_service_proto_init() {364 if File_google_cloud_asset_v1p5beta1_asset_service_proto != nil {365 return366 }367 file_google_cloud_asset_v1p5beta1_assets_proto_init()368 if !protoimpl.UnsafeEnabled {369 file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {370 switch v := v.(*ListAssetsRequest); i {371 case 0:372 return &v.state373 case 1:374 return &v.sizeCache...

Full Screen

Full Screen

asset.go

Source:asset.go Github

copy

Full Screen

1package grpc2import (3 "context"4 "fmt"5 "go-common/app/service/main/ugcpay/api/grpc/v1"6 "go-common/app/service/main/ugcpay/model"7 "go-common/app/service/main/ugcpay/service"8 "go-common/library/log"9 "go-common/library/net/metadata"10 "go-common/library/net/rpc/warden"11 "google.golang.org/grpc"12)13// New Identify warden rpc server14func New(cfg *warden.ServerConfig, s *service.Service) *warden.Server {15 w := warden.NewServer(cfg)16 w.Use(func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {17 if resp, err = handler(ctx, req); err == nil {18 log.Infov(ctx,19 log.KV("path", info.FullMethod),20 log.KV("caller", metadata.String(ctx, metadata.Caller)),21 log.KV("remote_ip", metadata.String(ctx, metadata.RemoteIP)),22 log.KV("args", fmt.Sprintf("%s", req)),23 log.KV("retVal", fmt.Sprintf("%s", resp)))24 }25 return26 })27 v1.RegisterUGCPayServer(w.Server(), &UGCPayServer{s})28 ws, err := w.Start()29 if err != nil {30 panic(err)31 }32 return ws33}34// UGCPayServer .35type UGCPayServer struct {36 svr *service.Service37}38var _ v1.UGCPayServer = &UGCPayServer{}39// AssetRegister .40func (u *UGCPayServer) AssetRegister(ctx context.Context, req *v1.AssetRegisterReq) (*v1.EmptyStruct, error) {41 err := u.svr.AssetRegister(ctx, req.Mid, req.Oid, req.Otype, req.Currency, req.Price)42 if err != nil {43 return nil, err44 }45 return &v1.EmptyStruct{}, nil46}47// AssetQuery .48func (u *UGCPayServer) AssetQuery(ctx context.Context, req *v1.AssetQueryReq) (*v1.AssetQueryResp, error) {49 res, pp, err := u.svr.AssetQuery(ctx, req.Oid, req.Otype, req.Currency)50 if err != nil {51 return nil, err52 }53 return &v1.AssetQueryResp{54 Price: res.Price,55 PlatformPrice: pp,56 }, nil57}58// AssetRelation .59func (u *UGCPayServer) AssetRelation(ctx context.Context, req *v1.AssetRelationReq) (*v1.AssetRelationResp, error) {60 res, err := u.svr.AssetRelation(ctx, req.Mid, req.Oid, req.Otype)61 if err != nil {62 return nil, err63 }64 return &v1.AssetRelationResp{65 State: res,66 }, nil67}68// AssetRelationDetail .69func (u *UGCPayServer) AssetRelationDetail(ctx context.Context, req *v1.AssetRelationDetailReq) (*v1.AssetRelationDetailResp, error) {70 state, err := u.svr.AssetRelation(ctx, req.Mid, req.Oid, req.Otype)71 if err != nil {72 return nil, err73 }74 res, pp, err := u.svr.AssetQuery(ctx, req.Oid, req.Otype, req.Currency)75 if err != nil {76 return nil, err77 }78 return &v1.AssetRelationDetailResp{79 RelationState: state,80 AssetPrice: res.Price,81 AssetPlatformPrice: pp,82 }, nil83}84// TradeCreate .85func (u *UGCPayServer) TradeCreate(ctx context.Context, req *v1.TradeCreateReq) (*v1.TradeCreateResp, error) {86 orderID, payData, err := u.svr.TradeCreate(ctx, req.Platform, req.Mid, req.Oid, req.Otype, req.Currency)87 if err != nil {88 return nil, err89 }90 return &v1.TradeCreateResp{91 OrderId: orderID,92 PayData: payData,93 }, nil94}95// TradeQuery .96func (u *UGCPayServer) TradeQuery(ctx context.Context, req *v1.TradeOrderReq) (*v1.TradeOrderResp, error) {97 order, err := u.svr.TradeQuery(ctx, req.Id)98 if err != nil {99 return nil, err100 }101 order.State = order.ReturnState()102 return &v1.TradeOrderResp{103 OrderId: order.OrderID,104 Mid: order.MID,105 Biz: order.Biz,106 Platform: order.Platform,107 Oid: order.OID,108 Otype: order.OType,109 Fee: order.Fee,110 Currency: order.Currency,111 PayId: order.PayID,112 State: order.State,113 Reason: order.PayReason,114 }, nil115}116// TradeCancel .117func (u *UGCPayServer) TradeCancel(ctx context.Context, req *v1.TradeOrderReq) (*v1.EmptyStruct, error) {118 err := u.svr.TradeCancel(ctx, req.Id)119 if err != nil {120 return nil, err121 }122 return &v1.EmptyStruct{}, nil123}124// TradeConfirm .125func (u *UGCPayServer) TradeConfirm(ctx context.Context, req *v1.TradeOrderReq) (*v1.TradeOrderResp, error) {126 order, err := u.svr.TradeConfirm(ctx, req.Id)127 if err != nil {128 return nil, err129 }130 order.State = order.ReturnState()131 return &v1.TradeOrderResp{132 OrderId: order.OrderID,133 Mid: order.MID,134 Biz: order.Biz,135 Platform: order.Platform,136 Oid: order.OID,137 Otype: order.OType,138 Fee: order.Fee,139 Currency: order.Currency,140 PayId: order.PayID,141 State: order.State,142 Reason: order.PayReason,143 }, nil144}145// TradeRefund .146func (u *UGCPayServer) TradeRefund(ctx context.Context, req *v1.TradeOrderReq) (*v1.EmptyStruct, error) {147 err := u.svr.TradeRefund(ctx, req.Id)148 if err != nil {149 return nil, err150 }151 return &v1.EmptyStruct{}, nil152}153// IncomeUserAssetOverview .154func (u *UGCPayServer) IncomeUserAssetOverview(ctx context.Context, req *v1.IncomeUserAssetOverviewReq) (*v1.IncomeUserAssetOverviewResp, error) {155 overview, monthReady, newDailyBill, err := u.svr.IncomeUserAssetOverview(ctx, req.Mid, "bp")156 if err != nil {157 return nil, err158 }159 // 总计收入160 resp := &v1.IncomeUserAssetOverviewResp{}161 if overview != nil {162 resp.Total = overview.TotalIn - overview.TotalOut163 resp.TotalBuyTimes = overview.PaySuccess - overview.PayError164 }165 // 本月新增收入166 resp.MonthNew = monthReady167 // 前日新增收入168 if newDailyBill != nil {169 resp.DayNew = newDailyBill.In - newDailyBill.Out170 }171 log.Info("IncomeUserAssetOverview grpc resp: %+v", resp)172 return resp, nil173}174// IncomeUserAssetList .175func (u *UGCPayServer) IncomeUserAssetList(ctx context.Context, req *v1.IncomeUserAssetListReq) (resp *v1.IncomeUserAssetListResp, err error) {176 // 月度收入177 if req.Ver > 0 {178 return u.incomeUserAssetListByVer(ctx, req.Mid, "bp", req.Ver, req.Pn, req.Ps)179 }180 // 总计收入181 return u.incomeUserAssetListByAll(ctx, req.Mid, "bp", req.Pn, req.Ps)182}183func (u *UGCPayServer) incomeUserAssetListByAll(ctx context.Context, mid int64, currency string, pn, ps int64) (resp *v1.IncomeUserAssetListResp, err error) {184 var (185 allList *model.AggrIncomeUserAssetList186 allPage *model.Page187 )188 // 获得总计收入189 if allList, allPage, err = u.svr.IncomeUserAssetList(ctx, mid, currency, 0, pn, ps); err != nil {190 return191 }192 // 查询 asset price193 assetPriceMap := make(map[string]int64) // assetPriceMap map[assetKey]price194 for _, a := range allList.Assets {195 as, _, err := u.svr.AssetQuery(ctx, a.OID, a.OType, a.Currency)196 if err != nil {197 log.Error("IncomeUserAssetList found invalid asset oid: %d, otype: %s, err: %+v", a.OID, a.OType, err)198 err = nil199 continue200 }201 assetPriceMap[assetKey(a.OID, a.OType, a.Currency)] = as.Price202 }203 // 写入返回值204 resp = &v1.IncomeUserAssetListResp{205 Page: &v1.Page{206 Num: allPage.Num,207 Size_: allPage.Size,208 Total: allPage.Total,209 },210 }211 for _, a := range allList.Assets {212 asset := &v1.IncomeUserAsset{213 Oid: a.OID,214 Otype: a.OType,215 Currency: a.Currency,216 Price: assetPriceMap[assetKey(a.OID, a.OType, a.Currency)],217 TotalBuyTimes: a.PaySuccess,218 NewBuyTimes: 0,219 TotalErrTimes: a.PayError,220 NewErrTimes: 0,221 }222 resp.List = append(resp.List, asset)223 }224 return resp, nil225}226func (u *UGCPayServer) incomeUserAssetListByVer(ctx context.Context, mid int64, currency string, ver int64, pn, ps int64) (resp *v1.IncomeUserAssetListResp, err error) {227 var (228 monthList *model.AggrIncomeUserAssetList229 monthPage *model.Page230 )231 // 获得月份收入232 if monthList, monthPage, err = u.svr.IncomeUserAssetList(ctx, mid, currency, ver, pn, ps); err != nil {233 return234 }235 // 查询 asset price236 assetPriceMap := make(map[string]int64) // assetPriceMap map[assetKey]price237 for _, a := range monthList.Assets {238 as, _, err := u.svr.AssetQuery(ctx, a.OID, a.OType, a.Currency)239 if err != nil {240 log.Error("IncomeUserAssetList found invalid asset oid: %d, otype: %s, err: %+v", a.OID, a.OType, err)241 err = nil242 continue243 }244 assetPriceMap[assetKey(a.OID, a.OType, a.Currency)] = as.Price245 }246 // 写入返回值247 resp = &v1.IncomeUserAssetListResp{248 Page: &v1.Page{249 Num: monthPage.Num,250 Size_: monthPage.Size,251 Total: monthPage.Total,252 },253 }254 for _, a := range monthList.Assets {255 var (256 asset = &v1.IncomeUserAsset{257 Oid: a.OID,258 Otype: a.OType,259 Currency: a.Currency,260 Price: 0,261 TotalBuyTimes: 0,262 NewBuyTimes: a.PaySuccess,263 TotalErrTimes: 0,264 NewErrTimes: a.PayError,265 }266 )267 asset.Price = assetPriceMap[assetKey(a.OID, a.OType, a.Currency)]268 allAsset, err := u.svr.IncomeUserAsset(ctx, mid, a.OID, a.OType, a.Currency, 0)269 if err != nil {270 log.Error("u.svr.IncomeUserAsset mid: %d, oid: %d, otype: %s, currency: %s, err: %+v", mid, a.OID, a.OType, a.Currency, err)271 err = nil272 continue273 }274 if allAsset == nil {275 log.Error("u.svr.IncomeUserAsset got nil asset, mid: %d, oid: %d, otype: %s, currency: %s", mid, a.OID, a.OType, a.Currency)276 err = nil277 continue278 }279 asset.TotalBuyTimes = allAsset.PaySuccess280 asset.TotalErrTimes = allAsset.PayError281 resp.List = append(resp.List, asset)282 }283 return284}285func assetKey(oid int64, otype, currency string) string {286 return fmt.Sprintf("%d_%s_%s", oid, otype, currency)287}...

Full Screen

Full Screen

assets.go

Source:assets.go Github

copy

Full Screen

...17// Lines returns the lines that this result is made from18func (r *AssetList) Lines() []int {19 return r.lines20}21// AssetItem is a single item parsed from an asset list22type AssetItem struct {23 Name string24 Quantity int6425 Volume float6426 Group string27 Category string28 Size string29 Slot string30 MetaLevel string31 TechLevel string32 PriceEstimate float6433}34var reAssetList = regexp.MustCompile(strings.Join([]string{35 `^([\S\ ]*)`, // Name36 `\t([` + bigNumberRegex + `*)`, // Quantity37 `(?:\t([\S ]*))?`, // Group38 `(?:\t([\S ]*))?`, // Category39 `(?:\t(XLarge|Large|Medium|Small|))?`, // Size40 `(?:\t(High|Medium|Low|Rigs|[\d ]*))?`, // Slot41 `(?:\t(` + bigNumberRegex + `*) (m3|м\^3))?`, // Volume42 `(?:\t([\d]+|))?`, // meta level43 `(?:\t([\d]+|))?`, // tech level44 `(?:\t(` + bigNumberRegex + `+) ISK)?$`, // price estimate45}, ""))46// ParseAssets will parse an asset listing47func ParseAssets(input Input) (ParserResult, Input) {48 assetList := &AssetList{}49 matches, rest := regexParseLines(reAssetList, input)50 assetList.lines = regexMatchedLines(matches)51 for _, match := range matches {52 qty := ToInt(match[2])53 if qty == 0 {54 qty = 155 }56 assetList.Items = append(assetList.Items,57 AssetItem{58 Name: CleanTypeName(match[1]),59 Quantity: qty,60 Group: match[3],...

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 contractAddress := common.HexToAddress("0x8b6e9c9c2e2c8f7d1e1d7b7aaf0c5e5b5a5f5f5f")7 {8 {9 },10 {11 },12 {13 },14 {15 },16 {17 }18 },19 {20 {21 },22 {23 },24 {25 },26 {

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 err := shim.Start(new(Asset))4 if err != nil {5 fmt.Printf("Error starting Asset chaincode: %s", err)6 }7}8type Asset struct {9}10func (t *Asset) Init(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {11}12func (t *Asset) Invoke(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {13 if function == "list" {14 return t.list(stub, args)15 }16}17func (t *Asset) Query(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) {18 if function == "list" {19 return t.list(stub, args)20 }21}22func (t *Asset) list(stub *shim.ChaincodeStub, args []string) ([]byte, error) {23 assetBytes, err := stub.GetState("asset")24 if err != nil {25 jsonResp := "{\"Error\":\"Failed to get state for " + "asset" + "\"}"26 return nil, errors.New(jsonResp)27 }28 if assetBytes == nil {29 jsonResp := "{\"Error\":\"Nil amount for " + "asset" + "\"}"30 return nil, errors.New(jsonResp)31 }32 jsonResp := string(assetBytes)33 fmt.Printf("Query Response:%s34}35import (36func main() {37 err := shim.Start(new(Asset))38 if err != nil {39 fmt.Printf("Error starting Asset chaincode: %s", err)40 }41}

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatalf("Failed to connect to the Ethereum client: %v", err)5 }6 address := common.HexToAddress("0x4d4b4c8b8c1b4d4b4c8b8c1b4d4b4c8b8c1b4d4b")7 abiAsset, err := abi.JSON(strings.NewReader(`[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2type Asset struct {3}4func (t *Asset) Init(stub shim.ChaincodeStubInterface) peer.Response {5 return shim.Success(nil)6}7func (t *Asset) Invoke(stub shim.ChaincodeStubInterface) peer.Response {8 function, args := stub.GetFunctionAndParameters()9 if function == "createAsset" {10 return t.createAsset(stub, args)11 } else if function == "queryAsset" {12 return t.queryAsset(stub, args)13 } else if function == "listAsset" {14 return t.listAsset(stub, args)15 }16 return shim.Error("Invalid invoke function name. Expecting \"createAsset\" \"queryAsset\" \"listAsset\"")17}18func (t *Asset) createAsset(stub shim.ChaincodeStubInterface, args []string) peer.Response {19 if len(args) != 2 {20 return shim.Error("Incorrect number of arguments. Expecting 2")21 }22 var asset = Asset{AssetID: args[0], Color: args[1], Size: args[2], Owner: args[3]}23 assetAsBytes, _ := json.Marshal(asset)24 err := stub.PutState(args[0], assetAsBytes)25 if err != nil {26 return shim.Error(fmt.Sprintf("Failed to create asset: %s", args[0]))27 }28 return shim.Success(nil)29}30func (t *Asset) queryAsset(stub shim.ChaincodeStubInterface, args []string) peer.Response {31 if len(args) != 1 {32 return shim.Error("Incorrect number of arguments. Expecting name of the asset to query")33 }34 assetAsBytes, err := stub.GetState(args[0])35 if err != nil {36 return shim.Error(fmt.Sprintf("Failed to query asset: %s with error: %s", args[0], err))37 }38 if assetAsBytes == nil {39 return shim.Error(fmt.Sprintf("Asset does not exist: %s", args[0]))40 }41 return shim.Success(assetAsBytes)42}43func (t *Asset)

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 client := http.Client{}4 resp, _ := client.Do(req)5 fmt.Println(resp)6}7import (8func main() {9 client := http.Client{}10 resp, _ := client.Do(req)11 fmt.Println(resp)12}13import (14func main() {15 client := http.Client{}16 resp, _ := client.Do(req)17 fmt.Println(resp)18}19import (20func main() {21 client := http.Client{}22 resp, _ := client.Do(req)

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2type AssetChaincode struct {3}4func (t *AssetChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {5}6func (t *AssetChaincode) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {7}8func (t *AssetChaincode) Query(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {9 if function == "list" {10 return t.list(stub, args)11 }12}13func (t *AssetChaincode) list(stub shim.ChaincodeStubInterface, args []string) ([]byte, error) {14 assetIterator, err := stub.RangeQueryState("", "")15 if err != nil {16 }17 defer assetIterator.Close()18 buffer.WriteString("[")19 for assetIterator.HasNext() {20 queryResponse, err := assetIterator.Next()21 if err != nil {22 }23 if bArrayMemberAlreadyWritten == true {24 buffer.WriteString(",")25 }26 buffer.WriteString("{\"Key\":")27 buffer.WriteString("\"")28 buffer.WriteString(queryResponse.Key)29 buffer.WriteString("\"")30 buffer.WriteString(", \"Record\":")31 buffer.WriteString(string(queryResponse.Value))32 buffer.WriteString("}")33 }34 buffer.WriteString("]")35 return buffer.Bytes(), nil36}37func main() {38 err := shim.Start(new(AssetChaincode))39 if err != nil {40 fmt.Printf("Error starting AssetChaincode: %s", err)41 }42}43import (

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1func main() {2 a := asset{}3 a.list()4}5func main() {6 a := asset{}7 a.list()8}9func main() {10 a := asset{}11 a.list()12}13func main() {14 a := asset{}15 a.list()16}17func main() {18 a := asset{}19 a.list()20}21func main() {22 a := asset{}23 a.list()24}25func main() {26 a := asset{}27 a.list()28}29func main() {30 a := asset{}31 a.list()32}33func main() {34 a := asset{}35 a.list()36}37func main() {38 a := asset{}39 a.list()40}41func main() {42 a := asset{}43 a.list()44}45func main()

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 assetList := asset.List()4 fmt.Println(assetList)5}6func List() []int {7 return []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}8}9The asset package can be imported in any file in the project. The import statement is:10import "asset"11The asset package can also be imported in any other project. The import statement is:12import "github.com/username/projectname/asset"13The asset package can be imported in any file in the project. The import statement is:14import "asset"15The asset package can also be imported in any other project. The import statement is:16import "github.com/username/projectname/asset"17The asset package can be imported in any file in the project. The import statement is:18import "asset"19The asset package can also be imported in any other project. The import statement is:20import "github.com/username/projectname/asset"21The asset package can be imported in any file in the project. The import statement is:22import "asset"23The asset package can also be imported in any other project. The import statement is:24import "github.com/username/projectname/asset"25The asset package can be imported in any file in the project. The import statement is:26import "asset"

Full Screen

Full Screen

list

Using AI Code Generation

copy

Full Screen

1func main() {2 assets := asset.List()3 fmt.Println("Assets: ", assets)4 assets = asset.List("BTC")5 fmt.Println("Assets: ", assets)6 assets = asset.List("BTC", "Bitcoin")7 fmt.Println("Assets: ", assets)8}9func main() {10 asset := asset.Get("BTC")11 fmt.Println("Asset: ", asset)12 asset = asset.Get("BTC", "Bitcoin")13 fmt.Println("Asset: ", asset)14}15func main() {16 asset := asset.Create("BTC", "Bitcoin")17 fmt.Println("Asset: ", asset)18}19func main() {20 asset := asset.Update("BTC", "Bitcoin")21 fmt.Println("Asset: ", asset)22}23func main() {24 asset := asset.Delete("BTC")25 fmt.Println("Asset: ", asset)26}27func main() {28 assets := asset.List()29 fmt.Println("Assets: ", assets)30 assets = asset.List("BTC")31 fmt.Println("Assets: ", assets)32 assets = asset.List("BTC", "Bitcoin")33 fmt.Println("Assets: ", assets)34}35func main() {36 asset := asset.Get("BTC")37 fmt.Println("Asset: ", asset)38 asset = asset.Get("BTC", "Bitcoin")39 fmt.Println("Asset: ", asset)40}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful